JBoss.orgCommunity Documentation
In the last chapter we integrated the Enabler in the JAIN SLEE Service's Sbb, the Parent Sbb, in this chapter it is explained how to use the Enabler's Sbb, the Child Sbb.
Enabler performs following tasks:
send publication events on behalf of Parent Sbb
based on values exchanged between Enabler and Server, Enabler keeps track of publication life time(expiration) and issues refresh requests to Server
JAIN SLEE SIP Publication Client Enabler control flow
The Mobicents
JAIN SLEE SIP Publication Client
Enabler Sbb, the Child Sbb, implements the
org.mobicents.slee.enabler.sip.PublicationClientChildSbbLocalObject
, which extends the
org.mobicents.slee.SbbLocalObjectExt
and
org.mobicents.slee.enabler.sip.PublicationClientChild
interfaces, the latter declares the methods which can be used to
interact with the Server:
package org.mobicents.slee.enabler.sip;
public interface PublicationClientChild {
public void newPublication(String entity, String eventPackage, String document, String contentType,
String contentSubType, int expires);
public void modifyPublication(String document, String contentType
, String contentSubType, int expires);
public void removePublication();
public String getEntity();
public String getETag();
}
String getETag()
method:
Fetches last SIP-ETag value returned by Server.
String getEntity()
method:
Fetches entity for which Enabler manages publication.
newPublication(String entity, String eventPackage, String
document, String contentType, String contentSubType, int expires);
method:
Creates new publication in Server.
PUBLISH
request is constructed with passed arguments.
modifyPublication(String document, String
contentType, String contentSubType, int expires);
method:
Issues modify
PUBLISH
request. Request is constructed with data passed as arguments and
state stored
when
new
publication is sent to server(event package, entity, ETag).
removePublication();
method:
Issues remove
PUBLISH
request. Request is constructed with data passed as arguments and
state stored
when previous publications are sent to server (event
package, entity,
ETag).
The Child Relation in the Parent Sbb Abstract Class is used to create and retrieve the Child Sbb:
PublicationClientChildSbbLocalObject sbb = null;
// creation
try {
sbb = (PublicationClientChildSbbLocalObject) getSipPublicationClientChildRelation().create(childName);
}
catch (Exception e) {
tracer.severe("Failed to create child sbb", e);
}
// retrieval
try {
sbb = (PublicationClientChildSbbLocalObject) getSipPublicationClientChildRelation().get(childName);
}
catch (Exception e) {
tracer.severe("Failed to retrieve child sbb", e);
}
Enabler can be configured with SLEE environment entries. Currently following entries are supported:
Table 4.1. Environment entry table
Name | Type | Description |
---|---|---|
server.address |
java.lang.String |
Specifies address to which requests should be forwarded. It has form of ip:port pair. |
expires.drift |
java.lang.Integer |
Specifies time drift, in seconds, between value of Expires/Min-Expires values and automatic refresh performed by enabler. For instance if Expires value passed(and accepted by ECS/PA) is 3600, time drift set to 10, Enabler will refresh publication after 3590 seconds |