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.lm
Class LongMessageReceiver

java.lang.Object
  extended by ie.ncl.msg.impl.SimpleConnection
      extended by ie.ncl.sms.lm.LongMessageReceiver
All Implemented Interfaces:
Connection, Receiver, ReceiverListener

public class LongMessageReceiver
extends ie.ncl.msg.impl.SimpleConnection
implements Receiver, ReceiverListener

This class is used to reassemble long messages that are fragmented and sent over SMS.

IMPORTANT: It is a good practice to use the ie.ncl.msg.Factory class to create instances of Receivers such as the LongMessageReceiver. This allows you to dynamically create transport independent software applications.

The Factory properties used by LongMessageReceiver configuration are:-

NAME VALUE DEFAULT    
class The name of the implementing class - ie.ncl.sms.lm.LongMessageReceiver mandatory
underlyingTransport The name of the underlying receiver configuration transport. This should be the name of another configuration in the factory properties file also. mandatory

See Also:
Factory

Field Summary
 
Fields inherited from interface ie.ncl.msg.Connection
CONNECTED, NOT_CONNECTED, NOT_USED, RECONNECTING
 
Constructor Summary
LongMessageReceiver()
           
LongMessageReceiver(Receiver receiver)
           
LongMessageReceiver(Receiver receiver, Cache cache)
          Construct a long message receiver given an underlying message transport.
 
Method Summary
 void acknowledge(Message m, boolean success)
          Acknowledge a long message.
 void close()
          Close the connection.
 void connect()
          Connect with the service.
 void init(java.util.Properties props)
          Initialise the object with settings specified in the properties.
 void receive(ReceiverListener listener)
          Set up a listener for long messages.
 boolean received(Receiver receiver, java.lang.Exception ex, Message m)
          Implements ReceiverListener callback.
 void setReceiverListener(ReceiverListener listener)
          Set up a listener for long messages.
 void shutdown()
          Shutdown the connection.
 
Methods inherited from class ie.ncl.msg.impl.SimpleConnection
connected, getConnectionStatus, getErrorListener, getName, getTypeDefaults, init, mergeDefaultAttributes, putTypeDefaults, setErrorListener, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ie.ncl.msg.Connection
connected, getConnectionStatus, getTypeDefaults, init, putTypeDefaults, setErrorListener
 

Constructor Detail

LongMessageReceiver

public LongMessageReceiver(Receiver receiver,
                           Cache cache)
Construct a long message receiver given an underlying message transport.


LongMessageReceiver

public LongMessageReceiver(Receiver receiver)

LongMessageReceiver

public LongMessageReceiver()
Method Detail

received

public boolean received(Receiver receiver,
                        java.lang.Exception ex,
                        Message m)
Implements ReceiverListener callback.

Specified by:
received in interface ReceiverListener
Returns:
true to indicate the message was received successfully, false otherwise
See Also:
Receiver, Receiver.receive(ReceiverListener)

receive

public void receive(ReceiverListener listener)
             throws ConnectionException
Set up a listener for long messages.

Specified by:
receive in interface Receiver
Throws:
ConnectionException
See Also:
Message

setReceiverListener

public void setReceiverListener(ReceiverListener listener)
                         throws ConnectionException
Set up a listener for long messages.

Specified by:
setReceiverListener in interface Receiver
Throws:
ConnectionException
See Also:
Message

connect

public void connect()
             throws ConnectionException
Description copied from interface: Connection
Connect with the service. Until connect is called, no messages can be sent/received.

Specified by:
connect in interface Connection
Throws:
ConnectionException

init

public void init(java.util.Properties props)
          throws ConnectionException
Description copied from interface: Connection
Initialise the object with settings specified in the properties. The properties will be implementation specific.

Specified by:
init in interface Connection
Throws:
ConnectionException

acknowledge

public void acknowledge(Message m,
                        boolean success)
                 throws MessageException,
                        ConnectionException
Acknowledge a long message. Not implemented.

Specified by:
acknowledge in interface Receiver
Throws:
MessageException
ConnectionException

close

public void close()
Close the connection.

Specified by:
close in interface Connection
Specified by:
close in class ie.ncl.msg.impl.SimpleConnection

shutdown

public void shutdown()
Shutdown the connection.

Specified by:
shutdown in interface Connection

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