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 SyncReceiver

java.lang.Object
  extended by ie.ncl.msg.SyncReceiver
All Implemented Interfaces:
ReceiverListener

public class SyncReceiver
extends java.lang.Object
implements ReceiverListener

This is a convenience class for converting asynchronous receivers into synchronous receivers. Using this evades the need for the application to set-up callbacks.


Constructor Summary
SyncReceiver(Receiver receiver)
          Construct a blocking receiver.
 
Method Summary
 void close()
          Close the connection.
 void connect()
          Open the connection, if not already open.
 Message getLastMessageReceived()
           
 Message receive()
          Receive a message synchronously.
 boolean received(Receiver receiver, java.lang.Exception ex, Message m)
          Implements the SenderListener API - used internally.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncReceiver

public SyncReceiver(Receiver receiver)
             throws ConnectionException
Construct a blocking receiver.

Throws:
ConnectionException
Method Detail

getLastMessageReceived

public Message getLastMessageReceived()

received

public boolean received(Receiver receiver,
                        java.lang.Exception ex,
                        Message m)
Implements the SenderListener API - used internally.

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 Message receive()
                throws MessageException,
                       ConnectionException
Receive a message synchronously. This method will block until a message is received.

Throws:
MessageException
ConnectionException

close

public void close()
Close the connection.


connect

public void connect()
             throws ConnectionException
Open the connection, if not already open.

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