org.opengts.servers.taip
Class TrackClientPacketHandler
java.lang.Object
org.opengts.util.AbstractClientPacketHandler
org.opengts.servers.taip.TrackClientPacketHandler
- All Implemented Interfaces:
- ClientPacketHandler
public class TrackClientPacketHandler
- extends AbstractClientPacketHandler
Method Summary |
static void |
configInit()
|
int |
getActualPacketLength(byte[] packet,
int packetLen)
Callback to obtain the length of the next packet, based on the provided partial
packet data. |
byte[] |
getHandlePacket(byte[] pktBytes)
Parse the provided packet information, and return any response that should
be sent back to the remote device |
int |
getResponsePort()
Returns the client response port# |
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 org.opengts.util.AbstractClientPacketHandler |
clearSavedEventCount, clearTerminateSession, equals, equalsSessionID, forceCloseTCPSession, GetDebugMode, getFinalPacket, getHostAddress, getInetAddress, getInitialPacket, getIPAddress, getLocalPort, getMaximumPacketLength, getMinimumPacketLength, getName, getPromptEnabled, getRemotePort, getSavedEventCount, getSequenceID, getSessionID, getSessionInfo, getSessionStartTime, getSessionStartTimeMS, getSessionType, getTerminateSession, getThreadName, hasHostAddress, hasIPAddress, hasSavedEvents, idleTimeoutInterrupt, incrementSavedEventCount, IsDebugMode, isDuplex, isInputStream, isTCP, isTextPackets, isUDP, printSessionStart, printSessionTerminated, SetDebugMode, setPromptEnabled, setSavedEventCount, setSessionInfo, setTerminateSession, setTerminateSession, tcpWrite, terminateSession |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNIQUEID_PREFIX
public static java.lang.String[] UNIQUEID_PREFIX
MINIMUM_SPEED_KPH
public static double MINIMUM_SPEED_KPH
ESTIMATE_ODOMETER
public static boolean ESTIMATE_ODOMETER
SIMEVENT_GEOZONES
public static boolean SIMEVENT_GEOZONES
MINIMUM_MOVED_METERS
public static double MINIMUM_MOVED_METERS
ACK_RESPONSE_PORT
public static int ACK_RESPONSE_PORT
TrackClientPacketHandler
public TrackClientPacketHandler()
getResponsePort
public int getResponsePort()
- Description copied from class:
AbstractClientPacketHandler
- Returns the client response port#
- Specified by:
getResponsePort
in interface ClientPacketHandler
- Overrides:
getResponsePort
in class AbstractClientPacketHandler
- Returns:
- The port for UDP Datafram responses
sessionStarted
public void sessionStarted(java.net.InetAddress inetAddr,
boolean isTCP,
boolean isText)
- Description copied from class:
AbstractClientPacketHandler
- Called when the session has started
- Specified by:
sessionStarted
in interface ClientPacketHandler
- Overrides:
sessionStarted
in class AbstractClientPacketHandler
- Parameters:
inetAddr
- The host IP addressisTCP
- True if the connection is TCPisText
- True if the connection is text
sessionTerminated
public void sessionTerminated(java.lang.Throwable err,
long readCount,
long writeCount)
- Description copied from class:
AbstractClientPacketHandler
- Callback just before the session is terminated
- Specified by:
sessionTerminated
in interface ClientPacketHandler
- Overrides:
sessionTerminated
in class AbstractClientPacketHandler
getActualPacketLength
public int getActualPacketLength(byte[] packet,
int packetLen)
- Description copied from class:
AbstractClientPacketHandler
- Callback to obtain the length of the next packet, based on the provided partial
packet data.
- Specified by:
getActualPacketLength
in interface ClientPacketHandler
- Overrides:
getActualPacketLength
in class AbstractClientPacketHandler
getHandlePacket
public byte[] getHandlePacket(byte[] pktBytes)
- Description copied from class:
AbstractClientPacketHandler
- Parse the provided packet information, and return any response that should
be sent back to the remote device
- Specified by:
getHandlePacket
in interface ClientPacketHandler
- Specified by:
getHandlePacket
in class AbstractClientPacketHandler
- Parameters:
pktBytes
- The packet
- Returns:
- The response
configInit
public static void configInit()
main
public static void main(java.lang.String[] argv)