ie.omk.smpp.event
Interface ConnectionObserver

All Known Implementing Classes:
SMPPEventAdapter

public interface ConnectionObserver

A connection observer implementation is used to receive event updates from an Connection object. If an application wishes to use asynchronous communications mode with the API framework, it will need to provide an implementation of this interface to the Connection to be notified of SMPP events (such as packet reception).

Version:
$Id: ConnectionObserver.java 255 2006-03-09 09:34:37Z orank $
Author:
Oran Kelly
See Also:
Connection.addObserver(ie.omk.smpp.event.ConnectionObserver)

Method Summary
 void packetReceived(Connection source, SMPPPacket packet)
          Called when a new SMPP packet has been received from the SMSC.
 void update(Connection source, SMPPEvent event)
          Called for all events other than packet reception.
 

Method Detail

packetReceived

void packetReceived(Connection source,
                    SMPPPacket packet)
Called when a new SMPP packet has been received from the SMSC. This method is called by the API framework whenever an SMPP packet has been read and decoded from the network connection to the SMSC. Identification of the packet type can be achieved by calling SMPPPacket.getCommandId().

Parameters:
source - the Connection which received the packet.
packet - the SMPP packet received.

update

void update(Connection source,
            SMPPEvent event)
Called for all events other than packet reception. This method is called for all events generated by the API framework except that of a packet received. The packetReceived(ie.omk.smpp.Connection, ie.omk.smpp.message.SMPPPacket)method is called in that case. The update method is mostly used for control events, such as signifying the exit of the receiver thread or notifying of error conditions.

Parameters:
source - the Connection which received the packet.
event - the SMPP event type.
See Also:
SMPPEvent.getType()


Copyright © 2011 smppapi at Sourceforge. All Rights Reserved.