org.exolab.jmscts.core
Class MessagingBehaviour

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

public class MessagingBehaviour
extends java.lang.Object

Determines the behaviour for sending and receiving messages

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

Constructor Summary
MessagingBehaviour()
          Construct a new instance, with default values
MessagingBehaviour(DeliveryType type)
          Construct a new instance, specifying the delivery type.
MessagingBehaviour(MessagingBehaviour behaviour)
          Construct a new instance, copying from an existing behaviour
 
Method Summary
 boolean getAdministered()
          Determines if destinations are administered or temporary
 int getDeliveryMode()
          Get the message delivery mode
 boolean getDurable()
          Returns true if topic subscribers are durable.
 int getPriority()
          Get the message priority used when sending messages
 ReceiptType getReceiptType()
          Returns the message receipt behaviour
 long getTimeout()
          Get the time to wait when listening or receiving messages
 void setAdministered(boolean type)
          Set the destination type (administered/temporary)
 void setDeliveryMode(int mode)
          Set the message delivery mode.
 void setDurable(boolean durable)
          Set the topic subscriber behaviour
 void setPriority(int priority)
          Set the priority of messages.
 void setReceiptType(ReceiptType receipt)
          Set the message receipt behaviour
 void setTimeout(long timeout)
          Set the time to wait when listening or receiving messages, before timing out
 java.lang.String toString()
          Returns a string representation of the messaging behaviour
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessagingBehaviour

public MessagingBehaviour()
Construct a new instance, with default values

MessagingBehaviour

public MessagingBehaviour(DeliveryType type)
Construct a new instance, specifying the delivery type.
Parameters:
type - the type of delivery when sending and receiving messages

MessagingBehaviour

public MessagingBehaviour(MessagingBehaviour behaviour)
Construct a new instance, copying from an existing behaviour
Parameters:
behaviour - behaviour the behaviour to copy
Method Detail

setDeliveryMode

public void setDeliveryMode(int mode)
Set the message delivery mode. This can be one of DeliveryMode.PERSISTENT or DeliveryMode.NON_PERSISTENT
Parameters:
mode - the message delivery mode when sending messages

getDeliveryMode

public int getDeliveryMode()
Get the message delivery mode
Returns:
the delivery mode used when sending messages

setAdministered

public void setAdministered(boolean type)
Set the destination type (administered/temporary)
Parameters:
type - if true, destinations are administered

getAdministered

public boolean getAdministered()
Determines if destinations are administered or temporary
Returns:
true if destinations are administered, false if they are temporary.

setReceiptType

public void setReceiptType(ReceiptType receipt)
Set the message receipt behaviour
Parameters:
receipt - the message receipt behaviour

getReceiptType

public ReceiptType getReceiptType()
Returns the message receipt behaviour
Returns:
the message receipt behaviour. May be null

setDurable

public void setDurable(boolean durable)
Set the topic subscriber behaviour
Parameters:
durable - if true topic subscribers are durable

getDurable

public boolean getDurable()
Returns true if topic subscribers are durable.
Returns:
true if topic subscribers are durable.

setPriority

public void setPriority(int priority)
Set the priority of messages.
Parameters:
priority - the priority set on a message when it is sent

getPriority

public int getPriority()
Get the message priority used when sending messages
Returns:
the priority of messages set when they are sent

setTimeout

public void setTimeout(long timeout)
Set the time to wait when listening or receiving messages, before timing out
Parameters:
timeout - the time to wait, in milliseconds

getTimeout

public long getTimeout()
Get the time to wait when listening or receiving messages
Returns:
the time to wait, in milliseconds

toString

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


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