Interface TcapLegManager
-
@SBBPart(id=@ComponentId(name="@component.name@",vendor="@component.vendor@",version="@component.version@"), sbbPartRefs=@SBBPartReference(id=@ComponentId(name="@sentinel-sip-spi.SentinelSipFeatureSPI SBB Part.name@",vendor="@sentinel-sip-spi.SentinelSipFeatureSPI SBB Part.vendor@",version="@sentinel-sip-spi.SentinelSipFeatureSPI SBB Part.version@")), libraryRefs=@LibraryReference(library=@ComponentId(name="@ipsmgw-tcapmessage-library.LibraryID.ipsmgw-tcapmessage-library.name@",vendor="@ipsmgw-tcapmessage-library.LibraryID.ipsmgw-tcapmessage-library.vendor@",version="@ipsmgw-tcapmessage-library.LibraryID.ipsmgw-tcapmessage-library.version@"))) @SBBPartDeployableUnit(securityPermissions=@SecurityPermissions(securityPermissionSpec="grant { permission java.security.AllPermission; };")) @BinderTargets(services="ipsmgw") public interface TcapLegManager
The TCAP leg manager allows features to create, link and remove TCAP legs.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPONENT_NAME_KEY
TCAP Leg Manager component name key, used inFailedInstruction
.static java.lang.String
COMPONENT_TYPE_NAME
TCAP Leg Manager component type value, used inFailedInstruction
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.opencloud.sentinel.sbb.SentinelActivityContextInterface
asSentinelActivityContextInterface(javax.slee.ActivityContextInterface aci)
Get the sentinel aci interface that corresponds to an aciTcapLeg
createLeg(com.opencloud.slee.resources.cgin.TcapApplicationContext appContext, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType)
Immediately create a leg.TcapLeg
createLeg(com.opencloud.slee.resources.cgin.TcapApplicationContext appContext, java.lang.String legName, java.lang.String targetFeature, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType)
Immediately create a leg.void
detachFromAllLegs()
Immediately detach from all legs.void
detachFromLeg(TcapLeg leg)
Immediately remove the Leg from the leg manager.void
endSession()
Immediately clear all pending requests on all legs.com.opencloud.sentinel.sbb.SentinelActivityContextInterface
getAciForLeg(TcapLeg leg)
Get the ACI of the dialog associated with a leg.com.opencloud.slee.resources.cgin.Dialog
getDialogForLeg(TcapLeg leg)
Get the dialog associated with a leg.TcapLeg
getLeg(com.opencloud.slee.resources.cgin.Dialog tcapDialog)
Determine the leg associated with the specified session.TcapLeg
getLeg(java.lang.String legName)
Return the TcapLeg with name legName.TcapLeg
getLeg(javax.slee.ActivityContextInterface aci)
Determine the leg associated with the specified aci.int
getLegCount()
Get the number of legs for the Leg Manager is managing.java.util.Collection<TcapLeg>
getLegs()
Return a Collection of legs for Leg Manager instance.com.opencloud.slee.resources.cgin.TcapApplicationContext
getTcapApplicationContext(java.lang.String protocolName, java.lang.String asn1Module, java.lang.String apiName)
Return a TcapApplicationContext object for a protocol, ans1 module, api, or null if not such TcapApplicationContext is known.TcapLeg
importAsNewLeg(com.opencloud.slee.resources.cgin.Dialog tcapDialog, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType)
Immediately creates a new leg.TcapLeg
importAsNewLeg(javax.slee.ActivityContextInterface aci, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType)
Immediately create a new leg and a dialog.void
releaseLeg(TcapLeg leg)
Immediately unlinks the leg if it is linked, clears any pending instructions and adds the releaseLeg instruction.
-
-
-
Field Detail
-
COMPONENT_TYPE_NAME
static final java.lang.String COMPONENT_TYPE_NAME
TCAP Leg Manager component type value, used inFailedInstruction
.- See Also:
- Constant Field Values
-
COMPONENT_NAME_KEY
static final java.lang.String COMPONENT_NAME_KEY
TCAP Leg Manager component name key, used inFailedInstruction
.- See Also:
- Constant Field Values
-
-
Method Detail
-
asSentinelActivityContextInterface
com.opencloud.sentinel.sbb.SentinelActivityContextInterface asSentinelActivityContextInterface(javax.slee.ActivityContextInterface aci)
Get the sentinel aci interface that corresponds to an aci- Parameters:
aci
- the aci- Returns:
- the sentinel aci
-
createLeg
TcapLeg createLeg(com.opencloud.slee.resources.cgin.TcapApplicationContext appContext, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType) throws DuplicateLegException, com.opencloud.slee.resources.cgin.ProtocolException
Immediately create a leg. An underlying dialog will be created if a DialogOpenRequestTcapMessage is set on the new leg.- Parameters:
appContext
-TcapApplicationContext
to be sent.legName
- the legName must be unique for this Sentinel SIP service instance. The recommended format for the name is [featurename]-[descriptive leg name]. Leg names are case sensitive.endpointType
- the type of SAS endpoint to use in call flows for this leg- Returns:
- created new TcapLeg.
- Throws:
DuplicateLegException
- If leg already exists with the supplied name.com.opencloud.slee.resources.cgin.ProtocolException
- If TcapApplicationContext is not supported.
-
createLeg
TcapLeg createLeg(com.opencloud.slee.resources.cgin.TcapApplicationContext appContext, java.lang.String legName, java.lang.String targetFeature, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType) throws DuplicateLegException, com.opencloud.slee.resources.cgin.ProtocolException
Immediately create a leg. An underlying dialog will be created if a DialogOpenRequestTcapMessage is set on the new leg.- Parameters:
appContext
-TcapApplicationContext
to be sent.legName
- the legName must be unique for this Sentinel SIP service instance. The recommended format for the name is [featurename]-[descriptive leg name]. Leg names are case sensitive.targetFeature
- the name of a feature that should directly received any events on the new leg.endpointType
- the type of SAS endpoint to use in call flows for this leg- Returns:
- created new TcapLeg.
- Throws:
DuplicateLegException
- If leg already exists with the supplied name.com.opencloud.slee.resources.cgin.ProtocolException
- If TcapApplicationContext is not supported.
-
importAsNewLeg
TcapLeg importAsNewLeg(javax.slee.ActivityContextInterface aci, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType) throws DuplicateLegException
Immediately create a new leg and a dialog. Associate the new leg with the provided ACI. Attach the Sentinel Service SBB to the ACI.- Parameters:
aci
- ACI of new Leg. The ACI must have an activity of type MapDialog. The created Leg is accessed in the next feature invocation using the legName.legName
- the legName must be unique for this Sentinel SIP service instance. The recommended format for the legName is [featurename]-[descriptive leg name] e.g. conferenceFeature-conferenceModerator. Leg names are case sensitive.endpointType
- the type of SAS endpoint to use in call flows for this leg- Returns:
- Imported TcapLeg.
- Throws:
DuplicateLegException
- If leg already exists with the supplied name.
-
importAsNewLeg
TcapLeg importAsNewLeg(com.opencloud.slee.resources.cgin.Dialog tcapDialog, java.lang.String legName, com.opencloud.sentinel.ipsmgw.common.SasEndpointType endpointType) throws DuplicateLegException
Immediately creates a new leg. Associate the new leg with the provided TcapDialog activity. Attach the SBB to the ACI associated with the TcapDialog activity.- Parameters:
tcapDialog
- Dialog activity to be associated with the new Leg.legName
- the legName must be unique for this Sentinel SIP service instance. The recommended format for the legname is [featurename]-[descriptive leg name] e.g. conferenceFeature-conferenceModerator. Leg names are case sensitive.endpointType
- the type of SAS endpoint to use in call flows for this leg- Returns:
- Imported TcapLeg.
- Throws:
DuplicateLegException
- If a leg already exists with the supplied legName.
-
releaseLeg
void releaseLeg(TcapLeg leg)
Immediately unlinks the leg if it is linked, clears any pending instructions and adds the releaseLeg instruction.The action taken when processing the releaseLeg instruction can be:
- sending a Response
- detaching from activity
The appropriate action will depend on the current state of the leg. If there is a terminating message in the MessagesToSend queue of the leg, this will be used where possible.
When the LegManager has sent the Response on processing the releaseLeg instruction it will immediately remove the TcapLeg from the TcapLegManager registry.
Features which need a more fine-grained control over the release process should use a combination of
TcapLeg.sendClose(boolean)
,TcapLeg.sendUserAbort(DialogUserAbortTcapMessage)
,detachFromLeg(TcapLeg leg)
.- Parameters:
leg
- TcapLeg to release.
-
detachFromLeg
void detachFromLeg(TcapLeg leg)
Immediately remove the Leg from the leg manager. Detach the SBB from the ACI associated with the leg. As this method takes effect immediately, it is necessary to ensure that the TcapDialog/Activity has been handled and will end appropriately or that another Service will take control of it. Any pending instructions will not be processed on this leg. The detached Leg cannot be accessed via any subsequent features.- Parameters:
leg
- TcapLeg to detach.
-
detachFromAllLegs
void detachFromAllLegs()
Immediately detach from all legs. Each leg is processed as described indetachFromLeg(TcapLeg)
.
-
getLeg
TcapLeg getLeg(com.opencloud.slee.resources.cgin.Dialog tcapDialog)
Determine the leg associated with the specified session.- Parameters:
tcapDialog
- Dialog- Returns:
- TcapLeg associated with the session or null if no leg associated with the session
-
getLeg
TcapLeg getLeg(javax.slee.ActivityContextInterface aci)
Determine the leg associated with the specified aci.- Parameters:
aci
- ACI- Returns:
- TcapLeg associated with the aci or null if no leg associated with the aci
-
getLeg
TcapLeg getLeg(java.lang.String legName)
Return the TcapLeg with name legName.- Parameters:
legName
- Unique name of the Leg.- Returns:
- TcapLeg associated with the legName.
-
getAciForLeg
com.opencloud.sentinel.sbb.SentinelActivityContextInterface getAciForLeg(TcapLeg leg)
Get the ACI of the dialog associated with a leg. Equivalent toTcapLeg.getAci()
.- Parameters:
leg
- the leg- Returns:
- the aci
-
getDialogForLeg
com.opencloud.slee.resources.cgin.Dialog getDialogForLeg(TcapLeg leg)
Get the dialog associated with a leg. Equivalent toTcapLeg.getTcapDialog()
.- Parameters:
leg
- the leg- Returns:
- the dialog
-
getTcapApplicationContext
com.opencloud.slee.resources.cgin.TcapApplicationContext getTcapApplicationContext(java.lang.String protocolName, java.lang.String asn1Module, java.lang.String apiName)
Return a TcapApplicationContext object for a protocol, ans1 module, api, or null if not such TcapApplicationContext is known. For example: protocolName = "map", asnModule = "MAP-ApplicationContexts-ph1", apiNAme = "shortMsgGatewayContext-v1-ac"- Parameters:
protocolName
- the protocol nameasn1Module
- the module nameapiName
- the api name.- Returns:
- the TcapApplicationContext object, or null if not such TcapApplicationContext is known.
-
getLegs
java.util.Collection<TcapLeg> getLegs()
Return a Collection of legs for Leg Manager instance.- Returns:
- Collection of legs.
-
getLegCount
int getLegCount()
Get the number of legs for the Leg Manager is managing.- Returns:
- number of legs managed.
-
endSession
void endSession()
Immediately clear all pending requests on all legs. Queue an endSession instruction on all legs. If there are terminating message in the MessagesToSend queue of the legs, these will be used where possible.During instruction processing end session will be performed on each leg.
-
-