Oracle Application Server
Web Services Java API Reference
10g Release 3 (10.1.3)

B25988-01


oracle.webservices.reliability
Interface ReliabilityContext


public interface ReliabilityContext

Context for reliable interactions. Used to set reliability characteristics of messages that are sent within the scope of the context. Also used to demarcate groups of ordered messages.


Field Summary
static int ACKNOWLEDGMENT_TYPE_CALLBACK
          The 'asynchronous' acknowledgment type (0).
static int ACKNOWLEDGMENT_TYPE_CONFIG
          The acknowledgment type will be taken from the management config file if it exists (3).
static int ACKNOWLEDGMENT_TYPE_POLL
          The 'poll' acknowledgment type (2).
static int ACKNOWLEDGMENT_TYPE_SYNCHRONOUS
          The 'synchronous' acknowledgment type (1).

 

Method Summary
 void addReliabilityListener(ReliabilityListener listener)
          Adds a reliability listener to the Global Callback.
 void destroy()
          Destroys the current context
 void endMessageOrdering()
          Ends message ordering on the current group in the context
 int getAcknowledgmentType()
          Gets the type of acknowledgement expected; synchronous, asynchronous or poll.
 long getExpiryTime()
          Gets the expiry time for messages in this context
 String getGroupId()
          Gets the current group id
 long getGroupMaxExpiryTime()
          Gets the max expiry time for messages in a group
 long getGroupMaxIdleTime()
          Gets the max idle time for messages in a group
 String getReplyToURL()
          Gets the URL to which replies will be sent.
 long getSequenceNumber()
          Gets the sequence number of the next message.
 boolean isDuplicateEliminationEnabled()
          Determines if duplicate elimination is enabled for this context.
 boolean isGuaranteedDeliveryEnabled()
          Determines if guaranteed delivery is enabled for this context.
 boolean isMessageOrdering()
          Determines if the context is in a message ordered group
 boolean isSendingLastMessageInGroup()
          Determines if the next message is flagged to be the last in the group.
 void removeReliabilityListener(ReliabilityListener listener)
          Removes a reliability listener from the Global Callback.
 void sendingLastMessageInGroup(boolean flag)
          Flags the next message as the last in the group.
 void setAcknowledgmentType(int acknowledgmentType)
          Sets the type of acknowledgement, sync, async or poll
 void setDuplicateEliminationEnabled(boolean enable)
          Enables duplicate elimination for this context
 void setExpiryTime(long expiryTime)
          Sets the expiry time for messages in this context
 void setGroupMaxExpiryTime(long groupMaxExpiryTime)
          Sets the max expiry time for messages in a group
 void setGroupMaxIdleTime(long groupMaxIdleTime)
          Sets the max idle time for messages in a group
 void setGuaranteedDeliveryEnabled(boolean enable)
          Enables guaranteed delivery for this context
 void setReplyToURL(String replyToURL)
          Sets the URL to which asynchronous replies will be sent.
 String startMessageOrdering()
          Creates a new group in which message ordering is enabled.

 

Field Detail

ACKNOWLEDGMENT_TYPE_CALLBACK

public static final int ACKNOWLEDGMENT_TYPE_CALLBACK
The 'asynchronous' acknowledgment type (0).
See Also:
Constant Field Values

ACKNOWLEDGMENT_TYPE_SYNCHRONOUS

public static final int ACKNOWLEDGMENT_TYPE_SYNCHRONOUS
The 'synchronous' acknowledgment type (1).
See Also:
Constant Field Values

ACKNOWLEDGMENT_TYPE_POLL

public static final int ACKNOWLEDGMENT_TYPE_POLL
The 'poll' acknowledgment type (2).
See Also:
Constant Field Values

ACKNOWLEDGMENT_TYPE_CONFIG

public static final int ACKNOWLEDGMENT_TYPE_CONFIG
The acknowledgment type will be taken from the management config file if it exists (3).
See Also:
Constant Field Values

Method Detail

getAcknowledgmentType

public int getAcknowledgmentType()
Gets the type of acknowledgement expected; synchronous, asynchronous or poll.
Returns:
the type of acknowledgement

setAcknowledgmentType

public void setAcknowledgmentType(int acknowledgmentType)
Sets the type of acknowledgement, sync, async or poll
Parameters:
acknowledgmentType -

getReplyToURL

public String getReplyToURL()
Gets the URL to which replies will be sent. This is required if an asynchronous reponse is expected.
Returns:
the URL

setReplyToURL

public void setReplyToURL(String replyToURL)
Sets the URL to which asynchronous replies will be sent. This is required only for an asynchronous reply pattern.
Parameters:
replyToURL -

getExpiryTime

public long getExpiryTime()
Gets the expiry time for messages in this context
Returns:
the expiry time

setExpiryTime

public void setExpiryTime(long expiryTime)
Sets the expiry time for messages in this context
Parameters:
expiryTime - the expiry time for messages

isGuaranteedDeliveryEnabled

public boolean isGuaranteedDeliveryEnabled()
Determines if guaranteed delivery is enabled for this context.
Returns:
true if guaranteed delivery is enabled.

setGuaranteedDeliveryEnabled

public void setGuaranteedDeliveryEnabled(boolean enable)
Enables guaranteed delivery for this context
Parameters:
enable - true to enable

isDuplicateEliminationEnabled

public boolean isDuplicateEliminationEnabled()
Determines if duplicate elimination is enabled for this context.
Returns:
true if duplicate elimination is enabled.

setDuplicateEliminationEnabled

public void setDuplicateEliminationEnabled(boolean enable)
Enables duplicate elimination for this context
Parameters:
enable - true to enable

isMessageOrdering

public boolean isMessageOrdering()
Determines if the context is in a message ordered group
Returns:
true if message ordering group is enabled.

startMessageOrdering

public String startMessageOrdering()
Creates a new group in which message ordering is enabled.
Returns:
the group Id in which message ordering has been enabled

endMessageOrdering

public void endMessageOrdering()
Ends message ordering on the current group in the context

sendingLastMessageInGroup

public void sendingLastMessageInGroup(boolean flag)
Flags the next message as the last in the group. The group is terminated after the next message is sent.
Parameters:
flag - true, sets the next message as the last in the group

isSendingLastMessageInGroup

public boolean isSendingLastMessageInGroup()
Determines if the next message is flagged to be the last in the group.
Returns:
true if it is the last message in the group.

getGroupId

public String getGroupId()
Gets the current group id
Returns:
the Group Id.

getSequenceNumber

public long getSequenceNumber()
Gets the sequence number of the next message. returns -1 for groups with only one message i.e. no sequence number
Returns:
sequence number of the next message.

getGroupMaxExpiryTime

public long getGroupMaxExpiryTime()
Gets the max expiry time for messages in a group
Returns:
the max expiry time

setGroupMaxExpiryTime

public void setGroupMaxExpiryTime(long groupMaxExpiryTime)
Sets the max expiry time for messages in a group
Parameters:
groupMaxExpiryTime - the expiry time for messages

getGroupMaxIdleTime

public long getGroupMaxIdleTime()
Gets the max idle time for messages in a group
Returns:
the max idle time

setGroupMaxIdleTime

public void setGroupMaxIdleTime(long groupMaxIdleTime)
Sets the max idle time for messages in a group
Parameters:
groupMaxIdleTime - the max idle time

destroy

public void destroy()
Destroys the current context

addReliabilityListener

public void addReliabilityListener(ReliabilityListener listener)
Adds a reliability listener to the Global Callback. The listener will be notified of all reliability events.
Parameters:
listener - the reliability listener to be added

removeReliabilityListener

public void removeReliabilityListener(ReliabilityListener listener)
Removes a reliability listener from the Global Callback.
Parameters:
listener - the listener to be removed.

Copyright © 2006, Oracle. All Rights Reserved.