|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.AbstractClientPacketHandler org.opengts.servers.template_old.TrackClientPacketHandler
public class TrackClientPacketHandler
Field Summary | |
---|---|
static boolean |
SIMEVENT_GEOZONES
|
Fields inherited from class org.opengts.util.AbstractClientPacketHandler |
---|
GMT_Timezone, PACKET_LEN_END_OF_STREAM, PACKET_LEN_LINE_TERMINATOR |
Constructor Summary | |
---|---|
TrackClientPacketHandler()
|
Method Summary | |
---|---|
static int |
_main(boolean fromMain)
|
int |
getActualPacketLength(byte[] packet,
int packetLen)
Callback to obtain the length of the next packet, based on the provided partial packet data. |
byte[] |
getFinalPacket(boolean hasError)
Returns the final packet that should be sent to the device before closing the socket connection. |
byte[] |
getHandlePacket(byte[] pktBytes)
Parse the provided packet information, and return any response that should be sent back to the remote device |
byte[] |
getInitialPacket()
Returns the initial packet that should be sent to the device upon openning the socket connection . |
static void |
main(java.lang.String[] argv)
|
void |
sessionStarted(java.net.InetAddress inetAddr,
boolean isTCP,
boolean isText)
Called when the session has started |
void |
sessionTerminated(java.lang.Throwable err,
long readCount,
long writeCount)
Callback just before the session is terminated |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean SIMEVENT_GEOZONES
Constructor Detail |
---|
public TrackClientPacketHandler()
Method Detail |
---|
public void sessionStarted(java.net.InetAddress inetAddr, boolean isTCP, boolean isText)
AbstractClientPacketHandler
sessionStarted
in interface ClientPacketHandler
sessionStarted
in class AbstractClientPacketHandler
inetAddr
- The host IP addressisTCP
- True if the connection is TCPisText
- True if the connection is textpublic void sessionTerminated(java.lang.Throwable err, long readCount, long writeCount)
AbstractClientPacketHandler
sessionTerminated
in interface ClientPacketHandler
sessionTerminated
in class AbstractClientPacketHandler
public int getActualPacketLength(byte[] packet, int packetLen)
AbstractClientPacketHandler
getActualPacketLength
in interface ClientPacketHandler
getActualPacketLength
in class AbstractClientPacketHandler
public byte[] getInitialPacket() throws java.lang.Exception
AbstractClientPacketHandler
getInitialPacket
in interface ClientPacketHandler
getInitialPacket
in class AbstractClientPacketHandler
java.lang.Exception
public byte[] getHandlePacket(byte[] pktBytes)
AbstractClientPacketHandler
getHandlePacket
in interface ClientPacketHandler
getHandlePacket
in class AbstractClientPacketHandler
pktBytes
- The packet
public byte[] getFinalPacket(boolean hasError) throws java.lang.Exception
AbstractClientPacketHandler
getFinalPacket
in interface ClientPacketHandler
getFinalPacket
in class AbstractClientPacketHandler
java.lang.Exception
public static int _main(boolean fromMain)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |