org.exolab.jmscts.core
Class AckType

java.lang.Object
  |
  +--org.exolab.jmscts.core.AckType

public final class AckType
extends java.lang.Object

Helper class used to indicate what message acknowledgement type should be used to run a particular test case against

Version:
$Revision: 1.4 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson
See Also:
AckTypes, SessionTestCase, SessionTestRunner

Field Summary
static AckType AUTO_ACKNOWLEDGE
          Non-transacted session, session automatically acknowledges messages
static AckType CLIENT_ACKNOWLEDGE
          Non-transacted session, client ackwnowledges messages
static AckType DUPS_OK_ACKNOWLEDGE
          Non-transacted session, messages are lazily acknowledged
static AckType TRANSACTED
          Transacted session
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines if this acknowledgement mode is equal to another object
static AckType fromString(java.lang.String type)
          Helper to convert a stringified acknowledgement type to a AckType instance
 int getAcknowledgeMode()
          Returns the acknowledgement mode.
 boolean getTransacted()
          Returns if the session should be transactional
 int hashCode()
          Returns a hash code value for the object
 java.lang.String toString()
          Returns a string representation of the acknowledgement type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSACTED

public static final AckType TRANSACTED
Transacted session

AUTO_ACKNOWLEDGE

public static final AckType AUTO_ACKNOWLEDGE
Non-transacted session, session automatically acknowledges messages

CLIENT_ACKNOWLEDGE

public static final AckType CLIENT_ACKNOWLEDGE
Non-transacted session, client ackwnowledges messages

DUPS_OK_ACKNOWLEDGE

public static final AckType DUPS_OK_ACKNOWLEDGE
Non-transacted session, messages are lazily acknowledged
Method Detail

getTransacted

public boolean getTransacted()
Returns if the session should be transactional
Returns:
true if the session should be transactional

getAcknowledgeMode

public int getAcknowledgeMode()
Returns the acknowledgement mode. This is only applicable for non-transacted sessions.
Returns:
the session acknowledgement mode

equals

public boolean equals(java.lang.Object obj)
Determines if this acknowledgement mode is equal to another object
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare
Returns:
true if equal, otherwise false

hashCode

public int hashCode()
Returns a hash code value for the object
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for the object

toString

public java.lang.String toString()
Returns a string representation of the acknowledgement type
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this

fromString

public static AckType fromString(java.lang.String type)
Helper to convert a stringified acknowledgement type to a AckType instance
Parameters:
type - the acknowledgement type
Returns:
an instance corresponding to type


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.