Interface TcapLeg
-
public interface TcapLeg
A TCAP leg represents the relation between an external TC user and the IPSMGW. A TCAP leg encapsulates aDialog
between the external TC user and the local TC user (the IPSMGW). A TCAP leg has an associated pending TCAP message (seehasPendingTCAPMessage()
,getPendingTCAPMessage()
,clearPendingTCAPMessage()
) that is created and updated by features during execution cycles of theTcapLegManager
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SEND_MESSAGE_FAILED_INSTRUCTION
Send Message instruction value, used inFailedInstruction
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acceptDialog()
Accept the dialog associated with the leg.void
acceptDialog(DialogMessageTcapMessage accept)
Accept the dialog associated with this leg.void
clearPendingTCAPMessage()
Reset/clear the pending TCAP message.boolean
dialogCanBeAccepted()
Check if the dialog can be accepted.javax.slee.ActivityContextInterface
getAci()
Return the ACI for this leg.long
getInvokeTimeout()
Returns the time in milliseconds of the Invoke Timeout used for this legDialogTcapMessage
getLatestIncomingTCAPMessage()
The latest Incoming TCAP message received on this leg's dialog.DialogTcapMessage
getLatestOutgoingTCAPMessage()
The latest Outgoing TCAP message sent on this leg's dialog.java.lang.String
getLegName()
The name assigned to the leg by the core or by a feature.TcapLeg
getLinkedLeg()
Return the leg linked to this leg.DialogTcapMessage
getPendingTCAPMessage()
The Pending TCAP message is built up during an execution cycle of the TCAP leg manager and processed after all feature execution scripts have finished.com.opencloud.sentinel.ipsmgw.common.SasEndpointType
getSasEndpoint()
Returns the SAS endpoint type to be used for all protocol events on this legjava.lang.String
getTargetFeature()
com.opencloud.slee.resources.cgin.Dialog
getTcapDialog()
Return the Dialog for this leg .boolean
hasPendingTCAPMessage()
The Pending TCAP message is built up during an execution cycle of the TCAP leg manager and processed after all feature execution scripts have finished.boolean
hasTargetFeature()
boolean
isLinked()
Return true if this leg is linked to another leg.void
issueOpenRequest(DialogOpenRequestTcapMessage openRequest)
Request that a new dialog, associated with this leg, should be initiated.boolean
isSuspended()
void
linkLeg(TcapLeg leg)
Immediately link this leg to the leg provided as an argument.void
refuseDialog()
Refuse an open dialog request.void
refuseDialog(DialogOpenRefuseTcapMessage refuse)
Refuse an open dialog request for the dialog associated with this leg.void
resume()
Resume sending messages.void
sendClose(boolean prearrangedEnd)
Close the dialog associated with this leg.void
sendDialogTcapMessage(DialogMessageTcapMessage toSend)
Issue a TCAP message on the dialog associated with this leg.void
sendError(TCOperationUserErrorTcapComponent<?> error)
Issue a user error response for an invoked operation on the dialog associated with this leg.void
sendInvoke(TCOperationInvokeTcapComponent toSend)
Issue an operation invoke on the dialog associated with this leg.void
sendResult(TCOperationResultTcapComponent result)
Issue a result to an operation on the dialog associated with this leg.void
sendUserAbort(DialogUserAbortTcapMessage abort)
Abort the dialog associated with this leg.void
setInvokeTimeout(long invokeTimeout)
Sets the Invoke Timeout value to be used for all messages on this leg.void
setSasEndpoint(com.opencloud.sentinel.ipsmgw.common.SasEndpointType sasEndpoint)
Sets the SAS endpoint type to be used for all protocol events on this legvoid
suspend()
Suspend sending messages.void
unlinkLeg()
Immediately unlink this leg from the leg linked to it, if any.
-
-
-
Field Detail
-
SEND_MESSAGE_FAILED_INSTRUCTION
static final java.lang.String SEND_MESSAGE_FAILED_INSTRUCTION
Send Message instruction value, used inFailedInstruction
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLegName
java.lang.String getLegName()
The name assigned to the leg by the core or by a feature. The name must be unique for the Sentinel instance. The Leg associated with the legName is obtained using theTcapLegManager.getLeg(String)
method.- Returns:
- Unique leg name for this leg.
-
hasTargetFeature
boolean hasTargetFeature()
- Returns:
- true, if there is a target feature associated with this leg
-
getTargetFeature
java.lang.String getTargetFeature()
- Returns:
- the target feature associated with this leg, or null if there is no such association
-
linkLeg
void linkLeg(TcapLeg leg) throws LegsAlreadyLinkedException, java.lang.IllegalArgumentException
Immediately link this leg to the leg provided as an argument. If the legs are already linked to each other, the legs will remain linked. If either of the legs is linked to another leg thenLegsAlreadyLinkedException
will be thrown. Legs may not be linked to themselves, andIllegalArgumentException
will be thrown if this is attempted. When linked, features may choose to act as a proxy between those legs.- Parameters:
leg
- the TcapLeg to link with this leg.- Throws:
LegsAlreadyLinkedException
- if either of the legs are currently linked to another leg.java.lang.IllegalArgumentException
- when supplied leg is null or is the same as this leg.
-
unlinkLeg
void unlinkLeg()
Immediately unlink this leg from the leg linked to it, if any. If the leg is not actually linked, there is no effect.
-
getLinkedLeg
TcapLeg getLinkedLeg()
Return the leg linked to this leg.- Returns:
- the TcapLeg linked to this leg, otherwise return null.
-
isLinked
boolean isLinked()
Return true if this leg is linked to another leg.- Returns:
- true if this leg is linked to another leg, otherwise return false.
-
hasPendingTCAPMessage
boolean hasPendingTCAPMessage()
The Pending TCAP message is built up during an execution cycle of the TCAP leg manager and processed after all feature execution scripts have finished.- Returns:
- true if there is a pending TCAP message associated with this leg
-
getPendingTCAPMessage
DialogTcapMessage getPendingTCAPMessage()
The Pending TCAP message is built up during an execution cycle of the TCAP leg manager and processed after all feature execution scripts have finished.- Returns:
- the pending TCAP message associated with this leg
-
getLatestIncomingTCAPMessage
DialogTcapMessage getLatestIncomingTCAPMessage()
The latest Incoming TCAP message received on this leg's dialog.- Returns:
- The latest Incoming TCAP message received on this leg's dialog.
-
getLatestOutgoingTCAPMessage
DialogTcapMessage getLatestOutgoingTCAPMessage()
The latest Outgoing TCAP message sent on this leg's dialog.- Returns:
- The latest Outgoing TCAP message sent on this leg's dialog.
-
issueOpenRequest
void issueOpenRequest(DialogOpenRequestTcapMessage openRequest)
Request that a new dialog, associated with this leg, should be initiated. The pending TCAP message is set to the open request. Any existing pending tcap message will be replaced by the open request. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.- Parameters:
openRequest
- the dialog open request
-
sendInvoke
void sendInvoke(TCOperationInvokeTcapComponent toSend)
Issue an operation invoke on the dialog associated with this leg. The invoke is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.- Parameters:
toSend
- invoke to send
-
sendResult
void sendResult(TCOperationResultTcapComponent result)
Issue a result to an operation on the dialog associated with this leg. The result is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.- Parameters:
result
- the operation result
-
sendError
void sendError(TCOperationUserErrorTcapComponent<?> error)
Issue a user error response for an invoked operation on the dialog associated with this leg. The error is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.- Parameters:
error
- a metadata object identifying the error to send
-
sendClose
void sendClose(boolean prearrangedEnd)
Close the dialog associated with this leg. Closing a dialog withprearrangedEnd == false
causes the pending TCAP message to be sent as a TC-End. IfprearrangedEnd == true
, no network message is sent and the dialog is torn down by the local Provider, discarding any operation requests and/or responses. If there is no pending TCAP message, a new TC-End pending TCAP message is created.- Parameters:
prearrangedEnd
-true
if the dialog closure was "prearranged",false
if not (a "basic end"). The typical argument value isfalse
.
-
sendUserAbort
void sendUserAbort(DialogUserAbortTcapMessage abort)
Abort the dialog associated with this leg. Any pending TCAP message is discard and replaced with the abort.- Parameters:
abort
- the user abort
-
acceptDialog
void acceptDialog(DialogMessageTcapMessage accept)
Accept the dialog associated with this leg. The pending TCAP message is set to the open accept. If theaccept
isnull
, then the pending TCAP message is set with a new open accept. Any existing pending tcap message will be replaced by the open accept. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.- Parameters:
accept
- the dialog accept
-
acceptDialog
void acceptDialog()
Accept the dialog associated with the leg. The pending TCAP message is set with a new open accept. Any existing pending tcap message will be replaced by the open accept. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.
-
refuseDialog
void refuseDialog(DialogOpenRefuseTcapMessage refuse)
Refuse an open dialog request for the dialog associated with this leg. The response is sent to the remote Provider and the dialog is torn down. The pending TCAP message is set to the open refuse. Ifrefuse
isnull
then the pending TCAP message is set to a new open refuse. Any existing pending tcap message will be replaced by the open refuse. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.- Parameters:
refuse
- the open refuse
-
refuseDialog
void refuseDialog()
Refuse an open dialog request. The response is sent to the remote Provider and the dialog is torn down. The pending TCAP message is set to a new open refuse. Any existing pending tcap message will be replaced by the open refuse. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.
-
sendDialogTcapMessage
void sendDialogTcapMessage(DialogMessageTcapMessage toSend)
Issue a TCAP message on the dialog associated with this leg. Typically such a message is a TC-Continue or a TC-End. Any existing pending tcap message will be replaced by the TCAP message. SeehasPendingTCAPMessage()
andclearPendingTCAPMessage()
.- Parameters:
toSend
- the message to send
-
clearPendingTCAPMessage
void clearPendingTCAPMessage()
Reset/clear the pending TCAP message. Typically cleared by sentinel core after the pending TCAP message has been processed, but may be cleared if a feature wishes to abort sending the pending message, without a replacement.
-
getTcapDialog
com.opencloud.slee.resources.cgin.Dialog getTcapDialog()
Return the Dialog for this leg .- Returns:
- Dialog for this leg.
-
dialogCanBeAccepted
boolean dialogCanBeAccepted()
Check if the dialog can be accepted.- Returns:
true
if the dialog exists, and is in theINIT_RECEIVED
state. (An Open Request has been received, but it has not been accepted or rejected yet)
-
getAci
javax.slee.ActivityContextInterface getAci()
Return the ACI for this leg.- Returns:
- ACI for this leg.
-
isSuspended
boolean isSuspended()
-
suspend
void suspend()
Suspend sending messages. The pending TCAP message is not processed at the end of the current execution cycle when the leg is suspended.- See Also:
resume()
,isSuspended()
-
resume
void resume()
Resume sending messages. The pending TCAP message will be processed at the end of the current execution cycle, after all feature execution scripts have finished.- See Also:
suspend()
,isSuspended()
-
setInvokeTimeout
void setInvokeTimeout(long invokeTimeout)
Sets the Invoke Timeout value to be used for all messages on this leg.- Parameters:
invokeTimeout
- time in milliseconds
-
getInvokeTimeout
long getInvokeTimeout()
Returns the time in milliseconds of the Invoke Timeout used for this leg- Returns:
- Invoke Timeout value in milliseconds
-
setSasEndpoint
void setSasEndpoint(com.opencloud.sentinel.ipsmgw.common.SasEndpointType sasEndpoint)
Sets the SAS endpoint type to be used for all protocol events on this leg- Parameters:
sasEndpoint
- the type of the SAS endpoint
-
getSasEndpoint
com.opencloud.sentinel.ipsmgw.common.SasEndpointType getSasEndpoint()
Returns the SAS endpoint type to be used for all protocol events on this leg- Returns:
- the SAS endpoint type
-
-