openr66.protocol.localhandler.packet
Class TestPacket

java.lang.Object
  extended by openr66.protocol.localhandler.packet.AbstractLocalPacket
      extended by openr66.protocol.localhandler.packet.TestPacket

public class TestPacket
extends AbstractLocalPacket

Test class for packet 3 strings: sheader,smiddle,send

Author:
frederic bregier

Field Summary
static int pingpong
           
 
Fields inherited from class openr66.protocol.localhandler.packet.AbstractLocalPacket
end, header, middle
 
Constructor Summary
TestPacket(String header, String middle, int code)
           
 
Method Summary
 void createEnd()
          Prepare the End buffer
static TestPacket createFromBuffer(int headerLength, int middleLength, int endLength, org.jboss.netty.buffer.ChannelBuffer buf)
           
 void createHeader()
          Prepare the Header buffer
 void createMiddle()
          Prepare the Middle buffer
 byte getType()
           
 String toString()
           
 void update()
           
 
Methods inherited from class openr66.protocol.localhandler.packet.AbstractLocalPacket
getLocalPacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pingpong

public static final int pingpong
See Also:
Constant Field Values
Constructor Detail

TestPacket

public TestPacket(String header,
                  String middle,
                  int code)
Method Detail

createFromBuffer

public static TestPacket createFromBuffer(int headerLength,
                                          int middleLength,
                                          int endLength,
                                          org.jboss.netty.buffer.ChannelBuffer buf)

createEnd

public void createEnd()
               throws OpenR66ProtocolPacketException
Description copied from class: AbstractLocalPacket
Prepare the End buffer

Specified by:
createEnd in class AbstractLocalPacket
Throws:
OpenR66ProtocolPacketException

createHeader

public void createHeader()
                  throws OpenR66ProtocolPacketException
Description copied from class: AbstractLocalPacket
Prepare the Header buffer

Specified by:
createHeader in class AbstractLocalPacket
Throws:
OpenR66ProtocolPacketException

createMiddle

public void createMiddle()
                  throws OpenR66ProtocolPacketException
Description copied from class: AbstractLocalPacket
Prepare the Middle buffer

Specified by:
createMiddle in class AbstractLocalPacket
Throws:
OpenR66ProtocolPacketException

getType

public byte getType()
Specified by:
getType in class AbstractLocalPacket
Returns:
the type of Packet

toString

public String toString()
Specified by:
toString in class AbstractLocalPacket

update

public void update()


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.