JBoss.orgCommunity Documentation

Chapter 3. Integrating the Mobicents JAIN SLEE SIP Publication Client Enabler

3.1. The Parent's SbbLocalObject Interface
3.2. The Parent's Sbb Abstract Class
3.3. The Parent Sbb XML Descriptor

This chapter explains how to setup a JAIN SLEE Service Sbb to use the Enabler.

In short terms, a Service's Sbb will define the Enabler's Sbb as a child, and to achieve that it will need to setup the XML Descriptor, Abstract Class and SbbLocalObject interface.

Important

The Service's Sbb will be referred as the Parent Sbb in the following sections.

Relation betweeen Parent Sbb, Enabler instance and publications in Server look as follows:

JAIN SLEE SIP Publication Client Enabler design

The Mobicents JAIN SLEE SIP Publication Client Enabler Sbb provides synchronous callbacks to the Parent's Sbb, and that can only be achieved if the Parent's SbbLocalObject extends a specific Java interface, deployed also by the Enabler, and provides it's SbbLocalObject to the Enabler's Sbb, through a specific method exposed by the latter interface. The Enabler stores the Parent's SbbLocalObject and uses it when a callback to the Parent's Sbb is needed.

The SbbLocalObject which must be used or extended by the Parent's Sbb is named org.mobicents.slee.enabler.sip.PublicationClientParentSbbLocalObject , which extends the javax.slee.SbbLocalObject and org.mobicents.slee.enabler.sip.PublicationClientParent interfaces, the latter declares the callbacks which must be implemented in the Parent's Sbb Abstract Class:



package org.mobicents.slee.enabler.sip;
public interface PublicationClientParent {
    public void newPublicationSucceed(PublicationClientChildSbbLocalObject child);
    public void modifyPublicationSucceed(PublicationClientChildSbbLocalObject child);
    public void removePublicationSucceed(PublicationClientChildSbbLocalObject child);
    public void newPublicationFailed(int errorCode,
            PublicationClientChildSbbLocalObject sbbLocalObject);
    public void modifyPublicationFailed(int errorCode,
            PublicationClientChildSbbLocalObject sbbLocalObject);
    public void refreshPublicationFailed(int errorCode,
            PublicationClientChildSbbLocalObject sbbLocalObject);
    public void removePublicationFailed(int errorCode,
            PublicationClientChildSbbLocalObject sbbLocalObject);
}
        
        

The Parent Sbb Abstract Class must implement the callbacks on it's SbbLocalObject, that is, must implement the org.mobicents.slee.enabler.sip.PublicationClientParent interface discussed in last section.

The Enabler is a Child Sbb. Parent requires JAIN SLEE 1.1 Child Relation to access Enabler. SLEE specification mandates parent to declare an abstract method to retrieve the javax.slee.ChildRelation object, which is used to create or access specific Child Sbbs. This method may be declared as follows:



    public abstract ChildRelation getSipPublicationClientChildRelation();
        
        

The Parent Sbb must define following information in its descriptor

child reference

A reference to the Enabler's Child Sbb is defined right after the Parent's Sbb Vendor ID element, using the following XML element:



            <sbb-ref>
                <sbb-name>SipPublicationClientChildSbb</sbb-name>
                <sbb-vendor>org.mobicents</sbb-vendor>
                <sbb-version>1.0</sbb-version>
                <sbb-alias>sipPubClientChildSbb</sbb-alias>
            </sbb-ref>
            
            
child relation method

The method name to get the Enabler's ChildRelation object must be defined after the CMP Fields (if any), this XML element links the sbb-alias previously defined with the abstract method declared in the Parent's Sbb Abstract Class:



                <get-child-relation-method>                 
                    <sbb-alias-ref>sipPubClientChildSbb</sbb-alias-ref>
                    <get-child-relation-method-name>getSipPublicationClientChildRelation</get-child-relation-method-name>
                    <default-priority>0</default-priority>
                </get-child-relation-method>
                
                
Sbb Local Object

After the sbb-abstract-class element the Parent's SbbLocalObject interface name is defined:



        <sbb-local-interface>
            <sbb-local-interface-name>...</sbb-local-interface-name>
        </sbb-local-interface>