Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.sms.gsm
Class Cache

java.lang.Object
  extended by ie.ncl.sms.gsm.Cache

public class Cache
extends java.lang.Object

Long message cache is used to store fragments of long messages that are received intermitently and reassemble them when the all fragments are received.
Note that the fragments are kept in memory, and if the application ceases to work then the message fragments will be lost.


Constructor Summary
Cache(int expiry)
          Construct a long message cache, specifying the expiry on the old message fragments.
 
Method Summary
 BinaryMessage add(UDHMessage udhm)
          Add a short (user data header) message to the cache, returning a full long Message if it is the last fragment of one.
 int countLongMessages()
          Count the number of long messages cached.
 int countShortMessages()
          Count the number of short messages cached.
 void purge()
          Purge the table - done as messages are added also.
 void warnings(boolean on)
          Public log expired messages.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache

public Cache(int expiry)
Construct a long message cache, specifying the expiry on the old message fragments.

Method Detail

warnings

public void warnings(boolean on)
Public log expired messages.


countShortMessages

public int countShortMessages()
Count the number of short messages cached.


countLongMessages

public int countLongMessages()
Count the number of long messages cached. This is not necessarily an integral multiple of the number of short messages because of expiry timeouts and variable number of fragments per long message.


add

public BinaryMessage add(UDHMessage udhm)
                  throws MessageException
Add a short (user data header) message to the cache, returning a full long Message if it is the last fragment of one.

Throws:
MessageException

purge

public void purge()
Purge the table - done as messages are added also.


Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit