Interface CGINProvider
-
public interface CGINProvider
Allows SLEE services to create new outgoing CGIN dialogs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isApplicationContextSupported(TcapApplicationContext appContext)
Test if a given application context is supported by this provider.Dialog
issueOpenRequest(TcapApplicationContext appContext, ObjectID appContextName, SccpAddress origAddress, SccpAddress destAddress, TcapVersion tcapVersion, long timeout, Object... userInformation)
Attempt to open a new dialog.Dialog
issueOpenRequest(TcapApplicationContext appContext, SccpAddress destAddress)
Attempt to open a new dialog.Dialog
issueStatelessOpenRequest(TcapApplicationContext appContext, ObjectID appContextName, byte[] origTransactionID, SccpAddress origAddress, SccpAddress destAddress, TcapVersion tcapVersion, Object... userInformation)
Attempt to open a new stateless dialog.void
relayMessage(DialogMessageEvent message, SccpAddress destAddress)
Relay a received BEGIN, QUERY, ITU_UNI, or ANSI_UNI message.Dialog
relayStatelessOpenRequest(DialogOpenRequestEvent openRequest, SccpAddress destAddress)
Create a stateless dialog suitable for relaying the given open request.
-
-
-
Method Detail
-
issueOpenRequest
Dialog issueOpenRequest(TcapApplicationContext appContext, SccpAddress destAddress) throws ProtocolException
Attempt to open a new dialog. ADialog
is allocated in the local Provider stack but the open request does not actually get delivered to the remote Provider until a dialog component primitive (such as a delimiter) is subsequently sent on the dialog. The originating SCCP address set for the open request is the default local SCCP address for the resource adaptor. Uses the configured default TCAP version. No user information is included in the request.As an optimization, services should call
Dialog.useComponentEvents()
orDialog.useMessageEvents()
on the returned dialog to indicate whether they are using the component-based or message-based event API for the dialog.- Parameters:
appContext
- the application context for the dialogdestAddress
- the SCCP address of the remote Provider to receive the open request- Returns:
- a dialog object
- Throws:
NullPointerException
- ifappContext
ordestAddress
isnull
.ProtocolException
- if the open request could not be passed down to the local Provider stack.
-
issueOpenRequest
Dialog issueOpenRequest(TcapApplicationContext appContext, ObjectID appContextName, SccpAddress origAddress, SccpAddress destAddress, TcapVersion tcapVersion, long timeout, Object... userInformation) throws ProtocolException
Attempt to open a new dialog. ADialog
is allocated in the local Provider stack but the open request does not actually get delivered to the remote Provider until a dialog component primitive (such as a delimiter) is subsequently sent on the dialog.As an optimization, services should call
Dialog.useComponentEvents()
orDialog.useMessageEvents()
on the returned dialog to indicate whether they are using the component-based or message-based event API for the dialog.- Parameters:
appContext
- the application context for the dialogappContextName
- the OID to use on the external network; null causes use of what's configured for appContextorigAddress
- the SCCP address of the local Provider; ifnull
, the default local address is useddestAddress
- the SCCP address of the remote Provider to receive the open requesttimeout
- how long, in milliseconds, to wait for a response on this dialog before aborting; 0 disables the timeouttcapVersion
- the TCAP version to use for the dialog; null uses the stack defaultuserInformation
- the user information to include in the TC-BEGIN- Returns:
- a dialog object
- Throws:
NullPointerException
- ifappContext
ordestAddress
isnull
ProtocolException
- if the open request could not be passed down to the local Provider stack.
-
issueStatelessOpenRequest
Dialog issueStatelessOpenRequest(TcapApplicationContext appContext, ObjectID appContextName, byte[] origTransactionID, SccpAddress origAddress, SccpAddress destAddress, TcapVersion tcapVersion, Object... userInformation) throws ProtocolException
Attempt to open a new stateless dialog. ADialog
is allocated in the local Provider stack but the open request does not actually get delivered to the remote Provider until a dialog component primitive (such as a delimiter) is subsequently sent on the dialog.Stateless dialogs provide support for "SCCP relay mode", where a TC-BEGIN is relayed to a new destination, but the node performing the relaying does not participate in subsequent messages on that dialog. They differ from normal (stateful) dialogs in several ways:
- the TCAP Originating Transaction ID to use in the TC-BEGIN is explicitly provided;
- they never receive incoming messages or generate timeouts;
- the dialog's SLEE activity is ended as soon as a Delimiter is sent
In general, to implement relay mode, an incoming stateful dialog causes creation of an outgoing stateless dialog, with the outgoing dialog using the same Originating Transaction ID and Originating Address as the incoming dialog. Invokes received on the incoming dialog are forwarded to the outgoing dialog, with modifications if necessary. When an incoming Delimiter is received, it is forwarded to the outgoing dialog (causing the SLEE activity for the outgoing dialog to end), and the incoming dialog is ended with a prearranged-end Close (causing the SLEE activity for the incoming dialog to end without a response being sent)
- Parameters:
appContext
- the application context for the dialogappContextName
- the OID to use on the external network; null causes use of what's configured for appContextorigTransactionID
- the originating TCAP transaction ID to include; 1-4 bytes; mandatoryorigAddress
- the SCCP address of the local Provider; mandatorydestAddress
- the SCCP address of the remote Provider to receive the open requesttcapVersion
- the TCAP version to use in the outgoing dialog; null uses the stack defaultuserInformation
- the user information to include in the TC-BEGIN- Returns:
- a stateless-dialog object
- Throws:
NullPointerException
- ifappContext
,origTransactionID
,origAddress
, ordestAddress
isnull
ProtocolException
- if the open request could not be passed down to the local Provider stack.
-
relayStatelessOpenRequest
Dialog relayStatelessOpenRequest(DialogOpenRequestEvent openRequest, SccpAddress destAddress) throws ProtocolException
Create a stateless dialog suitable for relaying the given open request. This is a convenience method that callsissueStatelessOpenRequest
with originating transaction ID, originating address, application context, tcap version and user information taken from the provided open request event. Additionally, the new dialog's SCCP parameters (SCCP class and return option) and external network ACN are set from those of the existing dialog.- Parameters:
openRequest
- the received open request to relaydestAddress
- the SCCP address of the remote provider to relay to- Returns:
- a stateless-dialog object
- Throws:
NullPointerException
- ifopenRequest
ordestAddress
arenull
ProtocolException
- if the open request could not be passed down to the local Provider stack.
-
relayMessage
void relayMessage(DialogMessageEvent message, SccpAddress destAddress) throws ProtocolException
Relay a received BEGIN, QUERY, ITU_UNI, or ANSI_UNI message. A stateless dialog is used to relay the message to the given address. The destination address is updated to a new address, but other details are unchanged. No SLEE-visible activity or dialog is created.- Parameters:
message
- the received message to relaydestAddress
- the SCCP address of the remote provider to relay to- Throws:
NullPointerException
- ifmessage
ordestAddress
arenull
IllegalArgumentException
- if the message is not a BEGIN or QUERY messageProtocolException
- if the open request could not be passed down to the local Provider stack.
-
isApplicationContextSupported
boolean isApplicationContextSupported(TcapApplicationContext appContext)
Test if a given application context is supported by this provider.- Parameters:
appContext
- the application context to query- Returns:
- true iff the given AC is supported
-
-