Class DialogMessageEvent
- java.lang.Object
-
- Event
-
- DialogEvent
-
- DialogMessageEvent
-
- Direct Known Subclasses:
DialogOpenRequestEvent
public class DialogMessageEvent extends DialogEvent
A single network message containing zero or more components received on a dialog.When using the message-oriented event API, dialog messages containing components are fired with an instance of DialogMessageEvent as the event object, and use an event type that depends on the type of network message received. See
DialogMessageType
for a list of the event types used.When using the component-oriented event API, the first event on a dialog is an instance of
DialogOpenRequestEvent
, which is a subclass of DialogMessageEvent. SeeDialogOpenRequestEvent
for further details.Included with each DialogMessageEvent is a (possibly empty) list of component events that were received in the network message.
Services should ensure that they process the first DialogMessageEvent on a dialog for application contexts they support, and avoid processing the first message of other dialogs, through use of an initial event selector method. This allows the resource adaptor to determine when an incoming application context is unsupported, and correctly refuse the dialog: it will refuse any dialog where no service processes the first event on a dialog. By using an initial event selector to decide which dialogs to process, many services handling different application contexts may coexist in the same SLEE instance.
Additionally, the resource adaptor implementation uses processing of the first event as an optimization to determine whether to use the message-oriented or component-oriented event API for a particular dialog. If the first component-based event (an OpenRequestEvent) is not processed, subsequent network messages will not generate component-based events. Similarly, if the first message-based event (a DialogMessageEvent) is not processed, subsequent network messages will not generate message-based events.
-
-
Constructor Summary
Constructors Constructor Description DialogMessageEvent(Dialog dialog, DialogMessageType messageType, boolean firstResponse, SccpAddress originatingAddress, SccpAddress destinationAddress, boolean hasLayer3OriginatingPointCode, int layer3OriginatingPointCode, boolean hasLayer3DestinationPointCode, int layer3DestinationPointCode, Object[] userInformation, ComponentEvent[] componentEvents)
Construct a new instance from provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TcapApplicationContext
getApplicationContext()
Get the application context in use on the underlying dialog.ComponentEvent[]
getComponentEvents()
Get the component events associated with this message.SccpAddress
getDestinationAddress()
Get the destination SCCP address (called party address) of the message.int
getLayer3DestinationPointCode()
Get the layer3 destination point code for the message.int[]
getLayer3DestinationPointCodeMemberClusterNetwork()
Get the layer3 destination point code for the message using the ANSI member/cluster/network format (8/8/8 bit fields).int[]
getLayer3DestinationPointCodeZoneAreaSignalPoint()
Get the layer3 destination point code for the message using the ITU-T zone/area/signal-point format (3/8/3 bit fields).int
getLayer3OriginatingPointCode()
Get the layer3 originating point code for the message.int[]
getLayer3OriginatingPointCodeMemberClusterNetwork()
Get the layer3 originating point code for the message using the ANSI member/cluster/network format (8/8/8 bit fields).int[]
getLayer3OriginatingPointCodeZoneAreaSignalPoint()
Get the layer3 originating point code for the message using the ITU-T zone/area/signal-point format (3/8/3 bit fields).DialogMessageType
getMessageType()
Get the network message type that was received.SccpAddress
getOriginatingAddress()
Get the originating SCCP address (calling party address) of the message.boolean
hasLayer3DestinationPointCode()
Determine if a layer3 destination point code is available for this message.boolean
hasLayer3OriginatingPointCode()
Determine if a layer3 originating point code is available for this message.boolean
isApplicationContextSupported()
Return true if the application context of this dialog is supported by the underlying resource adaptor.boolean
isFirstResponse()
Determine if this event is the first response message on the dialog.String
toString()
-
Methods inherited from class com.opencloud.slee.resources.cgin.DialogEvent
getUserInformation
-
-
-
-
Constructor Detail
-
DialogMessageEvent
public DialogMessageEvent(Dialog dialog, DialogMessageType messageType, boolean firstResponse, SccpAddress originatingAddress, SccpAddress destinationAddress, boolean hasLayer3OriginatingPointCode, int layer3OriginatingPointCode, boolean hasLayer3DestinationPointCode, int layer3DestinationPointCode, Object[] userInformation, ComponentEvent[] componentEvents)
Construct a new instance from provided parameters. Sole constructor.- Parameters:
dialog
- the newly created dialogmessageType
- an enum identifying the type of network message receivedfirstResponse
- true if this is the first response message on the dialogoriginatingAddress
- the TC originating address (SCCP calling party address) of the dialoguedestinationAddress
- the TC destination address (SCCP called party address) of the dialoguehasLayer3OriginatingPointCode
- true iflayer3OriginatingPointCode
contains a valid L3 point codelayer3OriginatingPointCode
- the originating point code in the layer3 message that this dialog event arrived inhasLayer3DestinationPointCode
- true iflayer3DestinationPointCode
contains a valid L3 point codelayer3DestinationPointCode
- the destination point code in the layer3 message that this dialog event arrived inuserInformation
- user information, if present in the responsecomponentEvents
- the component events received in the network message
-
-
Method Detail
-
getMessageType
public DialogMessageType getMessageType()
Get the network message type that was received.- Returns:
- the message type
-
isFirstResponse
public boolean isFirstResponse()
Determine if this event is the first response message on the dialog. The first response message is the first message received from the responding side, i.e. the initial response to a previously sent OpenRequest.- Returns:
- true if this event is the first response message on the dialog
-
getOriginatingAddress
public SccpAddress getOriginatingAddress()
Get the originating SCCP address (calling party address) of the message.- Returns:
- the originating SCCP address of the message.
-
getDestinationAddress
public SccpAddress getDestinationAddress()
Get the destination SCCP address (called party address) of the message. This is usually the well-known SCCP address of the local CGIN RA.- Returns:
- the destination SCCP address of the message.
-
hasLayer3OriginatingPointCode
public boolean hasLayer3OriginatingPointCode()
Determine if a layer3 originating point code is available for this message.- Returns:
- true if a layer3 originating point code is available
-
getLayer3OriginatingPointCode
public int getLayer3OriginatingPointCode()
Get the layer3 originating point code for the message.- Returns:
- the originating layer3 point code of the message
-
getLayer3OriginatingPointCodeZoneAreaSignalPoint
public int[] getLayer3OriginatingPointCodeZoneAreaSignalPoint()
Get the layer3 originating point code for the message using the ITU-T zone/area/signal-point format (3/8/3 bit fields).- Returns:
- an array of length 3 with values
{ zone, area, signal-point }
, ornull
if the originating layer3 point code was not available.
-
getLayer3OriginatingPointCodeMemberClusterNetwork
public int[] getLayer3OriginatingPointCodeMemberClusterNetwork()
Get the layer3 originating point code for the message using the ANSI member/cluster/network format (8/8/8 bit fields).- Returns:
- an array of length 3 with values
{ member, cluster, network }
, ornull
if the originating layer3 point code was not available.
-
hasLayer3DestinationPointCode
public boolean hasLayer3DestinationPointCode()
Determine if a layer3 destination point code is available for this message.- Returns:
- true if a layer3 destination point code is available
-
getLayer3DestinationPointCode
public int getLayer3DestinationPointCode()
Get the layer3 destination point code for the message.- Returns:
- the destination layer3 point code of the message
-
getLayer3DestinationPointCodeZoneAreaSignalPoint
public int[] getLayer3DestinationPointCodeZoneAreaSignalPoint()
Get the layer3 destination point code for the message using the ITU-T zone/area/signal-point format (3/8/3 bit fields).- Returns:
- an array of length 3 with values
{ zone, area, signal-point }
, ornull
if the destination layer3 point code was not available.
-
getLayer3DestinationPointCodeMemberClusterNetwork
public int[] getLayer3DestinationPointCodeMemberClusterNetwork()
Get the layer3 destination point code for the message using the ANSI member/cluster/network format (8/8/8 bit fields).- Returns:
- an array of length 3 with values
{ member, cluster, network }
, ornull
if the destination layer3 point code was not available.
-
getComponentEvents
public ComponentEvent[] getComponentEvents()
Get the component events associated with this message.- Returns:
- a non-null array of component events (may be zero-sized if no components were included in the message)
-
getApplicationContext
public TcapApplicationContext getApplicationContext()
Get the application context in use on the underlying dialog.- Returns:
- an TcapApplicationContext representing the protocol in use
-
isApplicationContextSupported
public boolean isApplicationContextSupported()
Return true if the application context of this dialog is supported by the underlying resource adaptor. If false, this dialog only exists for the purposes of allowing an application to select an appropriate alternative ACN to include in the open rejection.- Returns:
- true iff the application context in use is supported
-
-