Interface TcapLeg

    • Field Detail

    • 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 the TcapLegManager.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 then LegsAlreadyLinkedException will be thrown. Legs may not be linked to themselves, and IllegalArgumentException 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. See hasPendingTCAPMessage() and clearPendingTCAPMessage() .
        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 with prearrangedEnd == false causes the pending TCAP message to be sent as a TC-End. If prearrangedEnd == 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 is false.
      • 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 the accept is null, then the pending TCAP message is set with a new open accept. Any existing pending tcap message will be replaced by the open accept. See hasPendingTCAPMessage() and clearPendingTCAPMessage().
        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. See hasPendingTCAPMessage() and clearPendingTCAPMessage().
      • 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. If refuse is null then the pending TCAP message is set to a new open refuse. Any existing pending tcap message will be replaced by the open refuse. See hasPendingTCAPMessage() and clearPendingTCAPMessage().
        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. See hasPendingTCAPMessage() and clearPendingTCAPMessage().
      • 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. See hasPendingTCAPMessage() and clearPendingTCAPMessage().
        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 the INIT_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()
        Returns:
        true if suspended otherwise false
        See Also:
        resume(), suspend()
      • 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