org.opengts.servers.gtsdmtp
Class DeviceDBImpl

java.lang.Object
  extended by org.opengts.servers.gtsdmtp.DeviceDBImpl
All Implemented Interfaces:
org.opendmtp.server.db.DeviceDB

public class DeviceDBImpl
extends java.lang.Object
implements org.opendmtp.server.db.DeviceDB


Field Summary
static java.lang.String DEVICE_CODE
           
static boolean ESTIMATE_ODOMETER
           
static boolean SIMEVENT_GEOZONES
           
 
Constructor Summary
DeviceDBImpl(Device dev)
           
 
Method Summary
 boolean addClientPayloadTemplate(org.opendmtp.server.db.PayloadTemplate template)
           
 void clearPendingPackets(org.opendmtp.server.base.PacketList pktList)
           
static void configInit()
           
 Account getAccount()
           
 java.lang.String getAccountName()
           
 org.opendmtp.server.db.PayloadTemplate getClientPayloadTemplate(int custType)
           
 java.lang.String getDescription()
           
 Device getDevice()
           
 java.lang.String getDeviceName()
           
 byte[] getDuplexConnectionProfile()
           
 long getEventCount(long timeStart, long timeEnd)
           
 long getLastDuplexConnectionTime()
           
 long getLastTotalConnectionTime()
           
 int getLimitTimeIntervalMinutes()
           
 int getMaxAllowedEvents()
           
 int getMaxDuplexConnections()
           
 int getMaxDuplexConnectionsPerMinute()
           
 int getMaxTotalConnections()
           
 int getMaxTotalConnectionsPerMinute()
           
 org.opendmtp.server.base.PacketList getPendingPackets()
           
 org.opendmtp.server.base.PacketList getPendingPackets(boolean allowAutoDelete)
           
 byte[] getTotalConnectionProfile()
           
 void handleDiagnostic(int diagCode, byte[] diagData)
           
 void handleError(int errCode, byte[] errData)
           
 void handleProperty(int propKey, byte[] propVal)
           
 int insertEvent(org.opendmtp.server.base.DMTPGeoEvent geoEvent)
           
 boolean isActive()
           
 boolean isValidIpAddress(java.lang.String ipAddr)
           
 org.opengts.cellid.CellTower ParseCellTower(int[] CT)
           
 void removeEncoding(int encoding)
           
 int saveChanges()
           
 void sessionStatistics(long startTime, java.lang.String ipAddr, boolean isDuplex, long bytesRead, long bytesWritten, long evtsRecv)
           
 void setDuplexConnectionProfile(byte[] profile)
           
 void setLastDuplexConnectionTime(long time)
           
 void setLastTotalConnectionTime(long time)
           
 void setTotalConnectionProfile(byte[] profile)
           
 boolean supportsEncoding(int encoding)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEVICE_CODE

public static final java.lang.String DEVICE_CODE
See Also:
Constant Field Values

ESTIMATE_ODOMETER

public static boolean ESTIMATE_ODOMETER

SIMEVENT_GEOZONES

public static boolean SIMEVENT_GEOZONES
Constructor Detail

DeviceDBImpl

public DeviceDBImpl(Device dev)
Method Detail

configInit

public static void configInit()

getDevice

public Device getDevice()

getAccount

public Account getAccount()

getAccountName

public java.lang.String getAccountName()
Specified by:
getAccountName in interface org.opendmtp.server.db.DeviceDB

getDeviceName

public java.lang.String getDeviceName()
Specified by:
getDeviceName in interface org.opendmtp.server.db.DeviceDB

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface org.opendmtp.server.db.DeviceDB

isActive

public boolean isActive()
Specified by:
isActive in interface org.opendmtp.server.db.DeviceDB

isValidIpAddress

public boolean isValidIpAddress(java.lang.String ipAddr)
Specified by:
isValidIpAddress in interface org.opendmtp.server.db.DeviceDB

getMaxAllowedEvents

public int getMaxAllowedEvents()
Specified by:
getMaxAllowedEvents in interface org.opendmtp.server.db.DeviceDB

getEventCount

public long getEventCount(long timeStart,
                          long timeEnd)
Specified by:
getEventCount in interface org.opendmtp.server.db.DeviceDB

getLimitTimeIntervalMinutes

public int getLimitTimeIntervalMinutes()
Specified by:
getLimitTimeIntervalMinutes in interface org.opendmtp.server.db.DeviceDB

getMaxTotalConnections

public int getMaxTotalConnections()
Specified by:
getMaxTotalConnections in interface org.opendmtp.server.db.DeviceDB

getMaxTotalConnectionsPerMinute

public int getMaxTotalConnectionsPerMinute()
Specified by:
getMaxTotalConnectionsPerMinute in interface org.opendmtp.server.db.DeviceDB

getTotalConnectionProfile

public byte[] getTotalConnectionProfile()
Specified by:
getTotalConnectionProfile in interface org.opendmtp.server.db.DeviceDB

setTotalConnectionProfile

public void setTotalConnectionProfile(byte[] profile)
Specified by:
setTotalConnectionProfile in interface org.opendmtp.server.db.DeviceDB

getLastTotalConnectionTime

public long getLastTotalConnectionTime()
Specified by:
getLastTotalConnectionTime in interface org.opendmtp.server.db.DeviceDB

setLastTotalConnectionTime

public void setLastTotalConnectionTime(long time)
Specified by:
setLastTotalConnectionTime in interface org.opendmtp.server.db.DeviceDB

getMaxDuplexConnections

public int getMaxDuplexConnections()
Specified by:
getMaxDuplexConnections in interface org.opendmtp.server.db.DeviceDB

getMaxDuplexConnectionsPerMinute

public int getMaxDuplexConnectionsPerMinute()
Specified by:
getMaxDuplexConnectionsPerMinute in interface org.opendmtp.server.db.DeviceDB

getDuplexConnectionProfile

public byte[] getDuplexConnectionProfile()
Specified by:
getDuplexConnectionProfile in interface org.opendmtp.server.db.DeviceDB

setDuplexConnectionProfile

public void setDuplexConnectionProfile(byte[] profile)
Specified by:
setDuplexConnectionProfile in interface org.opendmtp.server.db.DeviceDB

getLastDuplexConnectionTime

public long getLastDuplexConnectionTime()
Specified by:
getLastDuplexConnectionTime in interface org.opendmtp.server.db.DeviceDB

setLastDuplexConnectionTime

public void setLastDuplexConnectionTime(long time)
Specified by:
setLastDuplexConnectionTime in interface org.opendmtp.server.db.DeviceDB

supportsEncoding

public boolean supportsEncoding(int encoding)
Specified by:
supportsEncoding in interface org.opendmtp.server.db.DeviceDB

removeEncoding

public void removeEncoding(int encoding)
Specified by:
removeEncoding in interface org.opendmtp.server.db.DeviceDB

addClientPayloadTemplate

public boolean addClientPayloadTemplate(org.opendmtp.server.db.PayloadTemplate template)
Specified by:
addClientPayloadTemplate in interface org.opendmtp.server.db.DeviceDB

getClientPayloadTemplate

public org.opendmtp.server.db.PayloadTemplate getClientPayloadTemplate(int custType)
Specified by:
getClientPayloadTemplate in interface org.opendmtp.server.db.DeviceDB

ParseCellTower

public org.opengts.cellid.CellTower ParseCellTower(int[] CT)

insertEvent

public int insertEvent(org.opendmtp.server.base.DMTPGeoEvent geoEvent)
Specified by:
insertEvent in interface org.opendmtp.server.db.DeviceDB

sessionStatistics

public void sessionStatistics(long startTime,
                              java.lang.String ipAddr,
                              boolean isDuplex,
                              long bytesRead,
                              long bytesWritten,
                              long evtsRecv)
Specified by:
sessionStatistics in interface org.opendmtp.server.db.DeviceDB

getPendingPackets

public org.opendmtp.server.base.PacketList getPendingPackets()
Specified by:
getPendingPackets in interface org.opendmtp.server.db.DeviceDB

getPendingPackets

public org.opendmtp.server.base.PacketList getPendingPackets(boolean allowAutoDelete)

clearPendingPackets

public void clearPendingPackets(org.opendmtp.server.base.PacketList pktList)
Specified by:
clearPendingPackets in interface org.opendmtp.server.db.DeviceDB

saveChanges

public int saveChanges()
Specified by:
saveChanges in interface org.opendmtp.server.db.DeviceDB

handleError

public void handleError(int errCode,
                        byte[] errData)
Specified by:
handleError in interface org.opendmtp.server.db.DeviceDB

handleDiagnostic

public void handleDiagnostic(int diagCode,
                             byte[] diagData)
Specified by:
handleDiagnostic in interface org.opendmtp.server.db.DeviceDB

handleProperty

public void handleProperty(int propKey,
                           byte[] propVal)
Specified by:
handleProperty in interface org.opendmtp.server.db.DeviceDB

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object