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 LongMessageReceiver

java.lang.Object
  extended by ie.ncl.sms.gsm.LongMessageReceiver
All Implemented Interfaces:
AttributeNames, MessageAttributeNames

public class LongMessageReceiver
extends java.lang.Object
implements MessageAttributeNames

Construct a long message receiver. This coalates short message fragments into long messages.


Field Summary
static int DEFAULT_TIMEOUT
          The default timeout (5 minutes).
 
Fields inherited from interface ie.ncl.sms.MessageAttributeNames
CC, DCS, EOT_GSM_ESCAPE_CHARACTER, PID, PRIORITY, RECEIPT, RECEIPT_BYTES, RECEIPT_STATUS, RECEIPT_TEXT, REGISTERED, REPLACE, REPLY_PATH, SCA, SCHEDULE, SUBMIT_ERROR, TIMESTAMP, UDH, UDHI, VALIDITY
 
Constructor Summary
LongMessageReceiver(Receiver receiver)
          Construct a LongMessageReceiver specifying the underlying SMS interface.
LongMessageReceiver(Receiver receiver, int timeout)
          Construct a LongMessageReceiver specifying the underlying SMS interface and the timeout.
 
Method Summary
 void close()
          Close the connection.
 void connect()
          Open the connection.
 boolean getAlwaysExpectHeaders()
          Check to see if the receiver is always expecting a header in the the short messages.
 Message receive()
          Block until a long message is received.
 void setAlwaysExpectHeaders(boolean value)
          Always expect the header even if the UDHI field is not set.
 void warnings(boolean on)
          Log warnings about expired messages.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static int DEFAULT_TIMEOUT
The default timeout (5 minutes).

Constructor Detail

LongMessageReceiver

public LongMessageReceiver(Receiver receiver,
                           int timeout)
                    throws ConnectionException
Construct a LongMessageReceiver specifying the underlying SMS interface and the timeout.

Throws:
ConnectionException
See Also:
Receiver

LongMessageReceiver

public LongMessageReceiver(Receiver receiver)
                    throws ConnectionException
Construct a LongMessageReceiver specifying the underlying SMS interface. A default timeout is used for expired short messages that do not coalesce into long messages.

Throws:
ConnectionException
See Also:
DEFAULT_TIMEOUT, Receiver
Method Detail

setAlwaysExpectHeaders

public void setAlwaysExpectHeaders(boolean value)
Always expect the header even if the UDHI field is not set. This is useful for older versions of the protocol where the UDHI field cannot be specified but where ALL messages have headers.


getAlwaysExpectHeaders

public boolean getAlwaysExpectHeaders()
Check to see if the receiver is always expecting a header in the the short messages.

See Also:
getAlwaysExpectHeaders()

receive

public Message receive()
                throws MessageException,
                       ConnectionException,
                       UserDataHeaderMalformedException
Block until a long message is received.

Throws:
MessageException
ConnectionException
UserDataHeaderMalformedException

warnings

public void warnings(boolean on)
Log warnings about expired messages.


close

public void close()
Close the connection.


connect

public void connect()
             throws ConnectionException
Open the connection.

Throws:
ConnectionException

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