?? simtcpsynackmessage.java
字號:
/* * @(#)$Id: SimTCPSYNACKMessage.java,v 1.7 2004/07/02 23:59:22 huebsch Exp $ * * Copyright (c) 2001-2004 Regents of the University of California. * All rights reserved. * * This file is distributed under the terms in the attached BERKELEY-LICENSE * file. If you do not find these files, copies can be found by writing to: * Computer Science Division, Database Group, Universite of California, * 617 Soda Hall #1776, Berkeley, CA 94720-1776. Attention: Berkeley License * * Copyright (c) 2003-2004 Intel Corporation. All rights reserved. * * This file is distributed under the terms in the attached INTEL-LICENSE file. * If you do not find these files, copies can be found by writing to: * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, * Berkeley, CA, 94704. Attention: Intel License Inquiry. */package simulator.services.network.tcp;import services.network.Payload;import util.FreeList;import util.FreeListFactory;import util.network.serialization.GenericByteBuffer;import util.network.serialization.SerializationManager;/** * Class SimTCPSYNACKMessage * */public class SimTCPSYNACKMessage extends SimTCPMessage implements Payload { public static long serialVersionUID = SerializationManager.getSerialUID( "simulator.services.network.tcp.SimTCPSYNACKMessage"); private static FreeList freeList = new FreeList(new SimTCPSYNACKMessageFactory()); /** * DeSerialize the object from the provided GenericByteBuffer. * * @param inputBuffer */ public SimTCPSYNACKMessage(GenericByteBuffer inputBuffer) { super(inputBuffer); } /** * Serialize the object into the provided GenericByteBuffer. * * @param outputBuffer * @return */ public long serialize(GenericByteBuffer outputBuffer) { super.serialize(outputBuffer); return serialVersionUID; } /** * Constructor SimTCPSYNACKMessage */ protected SimTCPSYNACKMessage() {} /** * Method toString * @return */ public String toString() { return super.toString() + "[SYNACK]"; } /** * Method allocate * * @param sourcePortNumber * @param destinationPortNumber * @return */ public static SimTCPSYNACKMessage allocate(Integer sourcePortNumber, Integer destinationPortNumber) { SimTCPSYNACKMessage message = (SimTCPSYNACKMessage) freeList.allocate(); message.init(sourcePortNumber, destinationPortNumber); return message; } /** * Method free * * @param message */ public static void free(SimTCPSYNACKMessage message) { freeList.free(message); }}/** * Class SimTCPSYNACKMessageFactory * */class SimTCPSYNACKMessageFactory implements FreeListFactory { /** * Method create * @return */ public Object create() { return new SimTCPSYNACKMessage(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -