The JAIN SIP 1.2 RA Type is an adaptation of the JAIN SIP 1.2 API, so that it may be used by SLEE applications.

RA Type Definition

Name: JSIP
Vendor: net.java.slee
Version: 1.2

Activities

The activity types supported by the JSIP RA Type are ClientTransaction, ServerTransaction and DialogActivity.

ClientTransaction

Client transaction activities are created using SipProvider.getNewClientTransaction(Request). SBBs can attach to the transaction's activity context interface in order to receive ResponseEvents.

The client transaction activity ends automatically when a final response is received, or the transaction timed out, in which case a TimeoutEvent will be fired.

ServerTransaction

Server transaction activities are created automatically by the RA, whenever a request is received that does not match a dialog. The RA will fire a RequestEvent on the activity.

The server transaction activity ends when a final response is sent using ServerTransaction.sendResponse(Response).

DialogActivity

Dialogs are used by applications that need to maintain state for an entire call or session. The DialogActivity class is defined by this RA Type, it extends the standard JAIN SIP Dialog interface, providing new methods aimed at SLEE applications.

Applications can use DialogActivity objects in place of Dialog objects when calling JAIN SIP methods. Conversely, the RA Type implementation guarantees that any Dialog objects returned by JAIN SIP methods may be safely typecast to DialogActivity.

Dialog activities are created using either SipProvider.getNewDialog(Transaction), SleeSipProvider.getNewDialog(Address, Address) or SleeSipProvider.getNewDialog(DialogActivity, boolean). Dialogs can also be created as a result of a fork, see DialogForkedEvent.

Once a dialog activity has been created, and established, future mid-dialog requests will be fired on the dialog as RequestEvents.

Dialog activities are automatically ended when a dialog terminating request is sent or received. This is either a BYE, for INVITE-initiated dialogs, or a NOTIFY with the "Subscription-State: terminated" header, for SUBSCRIBE-initiated dialogs.

SBB Resource Adaptor Interface

The SleeSipProvider interface is the SBB's main interface to the JAIN SIP RA entity. It extends SipProvider, providing additional methods for accessing the JAIN SIP factory objects (AddressFactory, HeaderFactory and MessageFactory), and useful methods for SLEE applications.

An SBB binds a SleeSipProvider into its JNDI component environment using a <resource-adaptor-entity-binding> element in the SBB deployment descriptor.

Events

The table below describes the events emitted by an RA implementing the JSIP 1.2 RA Type.

Event ID (name,vendor,version)Event ClassActivity ObjectNotes
javax.sip.message.Request.INVITE, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.ACK, net.java.slee, 1.2RequestEventServerTransaction1
javax.sip.message.Request.CANCEL, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.BYE, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.OPTIONS, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.REGISTER, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.SUBSCRIBE, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.NOTIFY, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.PUBLISH, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.MESSAGE, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.INFO, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.PRACK, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.UPDATE, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.REFER, net.java.slee, 1.2RequestEventServerTransaction 
javax.sip.message.Request.SIP_EXTENSION, net.java.slee, 1.2RequestEventServerTransaction2
javax.sip.Dialog.INVITE, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.ACK, net.java.slee, 1.2RequestEventDialogActivity1
javax.sip.Dialog.BYE, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.OPTIONS, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.REGISTER, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.SUBSCRIBE, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.NOTIFY, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.PUBLISH, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.MESSAGE, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.INFO, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.PRACK, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.UPDATE, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.REFER, net.java.slee, 1.2RequestEventDialogActivity 
javax.sip.Dialog.SIP_EXTENSION, net.java.slee, 1.2RequestEventDialogActivity2
javax.sip.message.Response.TRYING, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity3,4
javax.sip.message.Response.PROVISIONAL, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.message.Response.SUCCESS, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.message.Response.REDIRECT, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.message.Response.CLIENT_ERROR, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.message.Response.SERVER_ERROR, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.message.Response.GLOBAL_FAILURE, net.java.slee, 1.2ResponseEventClientTransaction or DialogActivity4
javax.sip.Timeout.TRANSACTION, net.java.slee, 1.2TimeoutEventClientTransaction or DialogActivity4
javax.sip.Timeout.DIALOG, net.java.slee, 1.2DialogTimeoutEventDialogActivity1,5
javax.sip.Dialog.FORKED, net.java.slee, 1.2DialogForkedEventDialogActivity6

Notes:

1.This event also ends the activity.
2.This event is used when the request method is not recognized.
3.This is just for "100 Trying" responses, which can usually be safely ignored by the app.
4.If a ClientTransaction activity is created to send a request (SipProvider.getNewClientTransaction()), the response will be fired on the ClientTransaction.
If the request is sent using DialogActivity.sendRequest() method, a ClientTransaction activity is not created, and the response will be fired on the DialogActivity.
5.This event signals that the RA has ended the dialog because an implementation-specific idle timeout was reached. It is recommended that RA implementations use RFC 4028 to determine when a dialog activity is inactive and should be timed out.
6.A forked event can occur when multiple dialog creating responses to an INVITE are received, due to a downstream proxy forking. This event is fired on the original dialog activity, and SBBs can retrieve the new dialog activity from the DialogForkedEvent object.
Packages 
Package Description
net.java.slee.resource.sip