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.msg
Class Loopback

java.lang.Object
  extended by ie.ncl.msg.impl.SimpleConnection
      extended by ie.ncl.msg.Loopback
All Implemented Interfaces:
Connection, Receiver, Sender, java.lang.Runnable

public class Loopback
extends ie.ncl.msg.impl.SimpleConnection
implements Sender, Receiver, java.lang.Runnable

The Loopback class is a test Sender and Receiver class. Messages sent on the send() method cause the receive callback to be called (in a separate thread).


Field Summary
 
Fields inherited from interface ie.ncl.msg.Connection
CONNECTED, NOT_CONNECTED, NOT_USED, RECONNECTING
 
Constructor Summary
Loopback()
          Create a new Loopback message sender and receiver.
 
Method Summary
 void acknowledge(Message m, boolean success)
          Receiver API.
 void close()
          Implements the Connection API - Close the connection.
 void connect()
          Implements Connection API.
 void init(java.util.Properties props)
          Implements Connection API.
 void receive(ReceiverListener listener)
          Implements Receiver API.
 void run()
          Internal thread process.
 void send(Message message, SenderListener listener)
          Implements Sender API.
 void setReceiverListener(ReceiverListener listener)
          Implements Receiver API.
 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

Loopback

public Loopback()
Create a new Loopback message sender and receiver.

Method Detail

connect

public void connect()
             throws ConnectionException
Implements Connection API.

Specified by:
connect in interface Connection
Throws:
ConnectionException

send

public void send(Message message,
                 SenderListener listener)
          throws MessageException,
                 ConnectionException
Implements Sender API.

Specified by:
send in interface Sender
Throws:
MessageException
ConnectionException
See Also:
SenderListener, Message

receive

public void receive(ReceiverListener listener)
             throws ConnectionException
Implements Receiver API.

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

setReceiverListener

public void setReceiverListener(ReceiverListener listener)
                         throws ConnectionException
Implements Receiver API.

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

run

public void run()
Internal thread process.

Specified by:
run in interface java.lang.Runnable

close

public void close()
Implements the Connection API - Close the connection.

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

shutdown

public void shutdown()
Description copied from interface: Connection
Shutdown the connection. This is used to shutdown a connection ungracefully.

Specified by:
shutdown in interface Connection

init

public void init(java.util.Properties props)
          throws ConnectionException
Implements Connection API.

Specified by:
init in interface Connection
Throws:
ConnectionException

acknowledge

public void acknowledge(Message m,
                        boolean success)
                 throws ConnectionException,
                        MessageException
Receiver API.

Specified by:
acknowledge in interface Receiver
Throws:
ConnectionException
MessageException

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