|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.protocols.smpp.util.AutoResponder
public class AutoResponder
A connection observer that can automatically respond to some of the basic
packet types. An instance of this class can be added as an observer to
a Session and configured to send response packets
to any of unbind, deliver_sm, data_sm or enquire_link requests.
After construction, the default configuration for an AutoResponder
is not to respond to anything. Each setting must be explicitly
enabled by the caller. As an example, in order to respond to enquire_link
and deliver_sm packets but to ignore bind and data_sm packets, code like
the following could be used:
Connection connection = new Connection(...); AutoResponder responder = new AutoResponder(); responder.setAckDeliverSm(true); responder.setAckEnqureLink(true); connection.addObserver(responder);
| Constructor Summary | |
|---|---|
AutoResponder()
Constructor that will initialise with all 'ack' properties initially set to false. |
|
AutoResponder(boolean respond)
Constructor that will initialise with all 'ack' properties initially set to respond. |
|
| Method Summary | |
|---|---|
boolean |
isAckDataSm()
|
boolean |
isAckDeliverSm()
|
boolean |
isAckEnquireLink()
|
boolean |
isAckUnbind()
|
void |
packetReceived(Session source,
SMPPPacket packet)
Called when a new SMPP packet has been received from the SMSC. |
void |
setAckDataSm(boolean ackDataSm)
|
void |
setAckDeliverSm(boolean ackDeliverSm)
|
void |
setAckEnquireLink(boolean ackEnquireLink)
|
void |
setAckUnbind(boolean ackUnbind)
|
void |
update(Session source,
SMPPEvent event)
Called for all events other than packet reception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoResponder()
public AutoResponder(boolean respond)
respond.
respond - The value to assign to all of this class' ack properties.| Method Detail |
|---|
public boolean isAckDataSm()
public void setAckDataSm(boolean ackDataSm)
public boolean isAckDeliverSm()
public void setAckDeliverSm(boolean ackDeliverSm)
public boolean isAckEnquireLink()
public void setAckEnquireLink(boolean ackEnquireLink)
public boolean isAckUnbind()
public void setAckUnbind(boolean ackUnbind)
public void packetReceived(Session source,
SMPPPacket packet)
SessionObserverSMPPPacket.getCommandId().
packetReceived in interface SessionObserversource - the Connection which received the packet.packet - the SMPP packet received.
public void update(Session source,
SMPPEvent event)
SessionObserverSessionObserver.packetReceived(org.mobicents.protocols.smpp.Session, org.mobicents.protocols.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.
update in interface SessionObserversource - the Connection which received the packet.event - the SMPP event type.com.adenki.smpp.event.SMPPEvent#getType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||