org.opengts.servers.template
Class TemplateCommandHandler

java.lang.Object
  extended by org.opengts.util.AbstractClientPacketHandler
      extended by org.opengts.db.CommandPacketHandler
          extended by org.opengts.servers.template.TemplateCommandHandler
All Implemented Interfaces:
ClientPacketHandler

public class TemplateCommandHandler
extends CommandPacketHandler

TemplateCommandHandler - This module contains the general "business logic" for sending commands to the remote tracking device.


Field Summary
 
Fields inherited from class org.opengts.db.CommandPacketHandler
ARG_ARG0, ARG_ARG1, ARG_ARG2, ARG_ARG3, ARG_ARG4, ARG_ARG5, ARG_ARG6, ARG_ARG7, ARG_ARG8, ARG_ARG9, ARG_CMDNAME, ARG_CMDTYPE, ARG_IP, ARG_LASTCONNECT, ARG_MESSAGE, ARG_PHONE, ARG_RESULT, ARG_SERVER, ARG_USER, CMD_ARGS, INTERNCMD_COMMANDS, INTERNCMD_SESSIONS, INTERNCMD_STACKTRACE
 
Fields inherited from class org.opengts.util.AbstractClientPacketHandler
GMT_Timezone, PACKET_LEN_END_OF_STREAM, PACKET_LEN_LINE_TERMINATOR
 
Constructor Summary
TemplateCommandHandler()
           
 
Method Summary
 java.lang.String decodeEscapeChars(java.lang.String s)
           
 int getClientCommandPort_tcp(int dftPort)
           
 int getClientCommandPort_udp(int dftPort)
           
 DCServerConfig.CommandProtocol getCommandProtocol()
           
 java.lang.String getServerName()
           
 DCServerFactory.ResultCode handleCommand(Device device, java.lang.String cmdType, java.lang.String cmdName, java.lang.String[] cmdArgs)
           
static void main(java.lang.String[] argv)
           
 
Methods inherited from class org.opengts.db.CommandPacketHandler
EncodeCommand, getActualPacketLength, getFromEmailCommand, getFromEmailCommand, getHandlePacket, getResponsePort, getTerminateSession, RESULT, sessionStarted, sessionTerminated, setResult, setTerminateSession, terminateSession, validateAddress, validateAddresses
 
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, getThreadName, hasHostAddress, hasIPAddress, hasSavedEvents, idleTimeoutInterrupt, incrementSavedEventCount, IsDebugMode, isDuplex, isInputStream, isTCP, isTextPackets, isUDP, printSessionStart, printSessionTerminated, SetDebugMode, setPromptEnabled, setSavedEventCount, setSessionInfo, setTerminateSession, tcpWrite
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateCommandHandler

public TemplateCommandHandler()
Method Detail

decodeEscapeChars

public java.lang.String decodeEscapeChars(java.lang.String s)

getServerName

public java.lang.String getServerName()
Specified by:
getServerName in class CommandPacketHandler

getClientCommandPort_udp

public int getClientCommandPort_udp(int dftPort)

getClientCommandPort_tcp

public int getClientCommandPort_tcp(int dftPort)

getCommandProtocol

public DCServerConfig.CommandProtocol getCommandProtocol()

handleCommand

public DCServerFactory.ResultCode handleCommand(Device device,
                                                java.lang.String cmdType,
                                                java.lang.String cmdName,
                                                java.lang.String[] cmdArgs)
Specified by:
handleCommand in class CommandPacketHandler

main

public static void main(java.lang.String[] argv)