org.exolab.jmscts.core
Class MessageTypes

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

public final class MessageTypes
extends java.lang.Object

Helper class used to indicate what JMS message types to run a particular test case against

Version:
$Revision: 1.5 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson
See Also:
MessageTestCase, MessageTestRunner

Field Summary
static MessageTypes ALL
          All message types
static MessageTypes BYTES
          The bytes message type
static MessageTypes MAP
          The map message type
static MessageTypes MESSAGE
          The 'message' message type
static MessageTypes OBJECT
          The object message type
static MessageTypes STREAM
          The stream message type
static MessageTypes TEXT
          The text message type
 
Method Summary
 int count()
          Return a count of the message types
static MessageTypes fromString(java.lang.String name)
          Helper to convert a message name to a MessageTypes instance
static MessageTypes fromString(java.lang.String[] names)
          Helper to convert a set of type strings to a MessageTypes instance
static java.lang.Class getType(javax.jms.Message message)
          Helper to return the type that a particular message implements
 java.lang.Class[] getTypes()
          Return the list of message types to test against
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE

public static final MessageTypes MESSAGE
The 'message' message type

BYTES

public static final MessageTypes BYTES
The bytes message type

MAP

public static final MessageTypes MAP
The map message type

OBJECT

public static final MessageTypes OBJECT
The object message type

STREAM

public static final MessageTypes STREAM
The stream message type

TEXT

public static final MessageTypes TEXT
The text message type

ALL

public static final MessageTypes ALL
All message types
Method Detail

getTypes

public java.lang.Class[] getTypes()
Return the list of message types to test against
Returns:
the list of message types to test against

getType

public static java.lang.Class getType(javax.jms.Message message)
Helper to return the type that a particular message implements
Parameters:
message - the message
Returns:
the type of the message

fromString

public static MessageTypes fromString(java.lang.String name)
Helper to convert a message name to a MessageTypes instance
Parameters:
name - the message name
Returns:
a MessageTypes instance corresponding to name, or null if name is invalid

fromString

public static MessageTypes fromString(java.lang.String[] names)
Helper to convert a set of type strings to a MessageTypes instance
Parameters:
names - the message names
Returns:
a MessageTypes instance corresponding to names

count

public int count()
Return a count of the message types
Returns:
the number of message types


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