JBoss.orgCommunity Documentation

Chapter 2. Resource Adaptor Type

2.1. Activities
2.2. Events
2.3. Activity Context Interface Factory
2.4. Resource Adaptor Interface
2.5. Sbb Code Examples
2.5.1. Accesing resource adaptor from Sbb
2.5.2. Handling Message from SMSC
2.5.3. Submitting message from SBB

SMPP5 Resource Adaptor Type is defined by Mobicents team as part of effort to standardize RA Types.

An SMPP activity object represents a set of related events in an SMPP resource. This RA Type defines the following Activity objects:

Events represent SMPP message or response to message and Timer expiry. Each SMPP message and response is fired as different event types. Events are fired on SmppTransaction activity. Following is the table that describes event-type (name, vendor and version), event-class.

Table 2.1.  Events fired by SMPP5

NameEvent ClassComments
ALERT_ NOTIFICATIONAlertNotification This message is sent by the SMSC to the ESME, when the SMSC has detected that a particular mobile subscriber has become available and a delivery pending flag had been set for that subscriber from a previous data_sm operation.
GENERIC_NACKGenericNack This is a generic negative acknowledgement to an SMPP PDU submitted with an invalid message header.
DELIVER_SMDeliverSM The deliver_sm is issued by the SMSC to send a message to an ESME. Using this command, the SMSC may route a short message to the ESME for delivery.
DELIVERY_REPORTDeliverSM SMSC Delivery Receipt. A delivery receipt relating to a a message which had been previously submitted with the submit_sm operation and the ESME had requested a delivery receipt via the registered_delivery parameter. The delivery receipt data relating to the original short message will be included in the short_message field of the deliver_sm.
DELIVER_SM _RESPDeliverSMResp The SMPP PDU response sent from an ESME that received DELIVER_SM message
SUBMIT_SMSubmitSM This operation is used by an ESME to submit a short message to the SMSC for onward transmission to a specified short message entity (SME).
SUBMIT_SM _RESPSubmitSMResp This is the response to the submit_sm PDU
DATA_SMDataSM This command is used to transfer data between the SMSC and the ESME. It may be used by both the ESME and SMSC. This command is an alternative to the submit_sm and deliver_sm commands. It is introduced as a new command to be used by interactive applications such as those provided via a WAP framework.
DATA_SM _RESPDataSMResp This is the response to the data_sm PDU
SUBMIT_MULTISubmitMulti The submit_multi operation may be used to submit an SMPP message for delivery to multiple recipients or to one or more Distribution Lists
SUBMIT_MULTI _RESPSubmitMultiResp This is the response to the submit_multi PDU
QUERY_SMQuerySM This command is issued by the ESME to query the status of a previously submitted short message.
QUERY_SM _RESPQuerySMResp This is the response to the query_sm PDU
CANCEL_SMCancelSM This command is issued by the ESME to cancel one or more previously submitted short messages that are still pending delivery.
CANCEL_SM _RESPCancelSMResp This is the response to the cancel_sm PDU
REPLACE_SMReplaceSM This command is issued by the ESME to replace a previously submitted short message that is still pending delivery.
REPLACE_SM _RESPReplaceSMResp This is the response to the replace_sm PDU
BROADCAST_SMBroadcastSM This operation is issued by the ESME to submit a message to the Message Centre for broadcast to a specified geographical area or set of geographical areas.
BROADCAST_ SM_RESPBroadcastSMResp This is the response to the broadcast_sm PDU
QUERY_BROAD CAST_SMQueryBroadcastSM This command is issued by the ESME to query the status of a previously submitted broadcast message
QUERY_BROADCAST _SM_RESPQueryBroadcastSMResp This is the response to the query_broadcast_sm PDU
CANCEL_BROAD CAST_SMCancelBroadcastSM This command is issued by the ESME to cancel a broadcast message which has been previously submitted to the Message Centre for broadcast via broadcast_sm and which is still pending delivery.
CANCEL_BROAD CAST_SM_RESPCancelBroadcastSMResp This is the response to the cancel_broadcast_sm PDU
SMPP_TIMEOUT_ RESPONSE_SENTSmppError This is issued when ESME receives SMPP PDU and doesn't send the corresponding response in configured time limit
SMPP_TIMEOUT_ RESPONSE_RECEIVEDSmppError This is issued when ESME has sent SMPP PDU but there is no corresponding response from SMSC in configured time limit

The interface of the SMPP resource adaptor type specific Activity Context Interface Factory is defined as follows:

	

package net.java.slee.resources.smpp;

public interface SmppTransactionACIFactory {
	javax.slee.ActivityContextInterface getActivityContextInterface(SmppTransaction txn);

}
	
	

The SMPP Resource Adaptor SBB Interface facilitates SBBs to create new SMS message and send it. It also facilitates sending of SMS message response. The isAlive() is check for connection between RA and SMSC is still alive. It is defined as follows:

		package net.java.slee.resources.smpp;

		import net.java.slee.resources.smpp.pdu.Address; 
		import net.java.slee.resources.smpp.pdu.SmppRequest; 
		import net.java.slee.resources.smpp.pdu.SmppResponse;

		public interface SmppSession {

			public String getSessionId();
	
			public String getSMSCHost();
	
			public int getSMSPort();
	
			public SmppTransaction sendRequest(SmppRequest request) throws
			java.lang.IllegalStateException, java.lang.NullPointerException,
			java.io.IOException;
	
			public void sendResponse(SmppTransaction txn, SmppResponse
			response) throws java.lang.IllegalStateException,
			java.lang.NullPointerException, java.io.IOException;
	
			public boolean isAlive();
	
			public SmppRequest createSmppRequest(long commandId);
	
			public Address createAddress(int addTon, int addNpi, String
			address);

		}