org.figure8.join.core.messaging
Class JMSConsumerBeanInfo

java.lang.Object
  extended by org.figure8.join.core.EntityObject
      extended by org.figure8.join.core.messaging.JMSConsumerBeanInfo
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class JMSConsumerBeanInfo
extends EntityObject

This is an EntityObject for describing a JMSConsumerBean, its configurable properties & parameters and its activation specification.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux
See Also:
Configurable, Serialized Form

Constructor Summary
JMSConsumerBeanInfo()
          Creates a new instance of JMSConsumerBeanInfo.
JMSConsumerBeanInfo(java.lang.String name, java.lang.String selector, java.lang.String destination, java.lang.String consumerBeanClass)
          Creates a new instance of JMSConsumerBeanInfo with mandatory params.
 
Method Summary
 void addConsumerParameterInfo(JMSConsumerBeanParameterInfo paramInfo)
          Convenient method for adding a parameter info to a consumer.
 java.lang.String getConsumerBeanClass()
           
 java.util.List getConsumerParameterInfos()
           
 java.lang.String getDestination()
           
 JMSConsumerBean getJMSConsumerBean()
          Get the JMSConsumerBean wrapped within this infos container.
 java.lang.String getName()
           
 java.lang.String getSelector()
           
protected  void instanciateConsumerBean()
          Try to instanciate wrapped consumerBean and configure it.
 boolean isActive()
           
 boolean isThreadSafe()
           
 void setActive(boolean active)
           
 void setConsumerBeanClass(java.lang.String consumerBeanClass)
          Give the FQN of Java class used for instanciating a JMSConsumerBean
 void setConsumerParameterInfos(java.util.List paramInfos)
           
 void setDestination(java.lang.String destination)
           
 void setName(java.lang.String name)
           
 void setSelector(java.lang.String selector)
           
 void setThreadSafe(boolean threadSafe)
           
 
Methods inherited from class org.figure8.join.core.EntityObject
clone, equals, getId, hashCode, isTransient
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSConsumerBeanInfo

public JMSConsumerBeanInfo()
Creates a new instance of JMSConsumerBeanInfo.


JMSConsumerBeanInfo

public JMSConsumerBeanInfo(java.lang.String name,
                           java.lang.String selector,
                           java.lang.String destination,
                           java.lang.String consumerBeanClass)
                    throws InvalidParameterException
Creates a new instance of JMSConsumerBeanInfo with mandatory params.

Parameters:
name - Name of this consumer
selector - Selector expression for filtering messages
destination - Name of JMS destination to listen from
consumerBeanClass - FQN of Java class for getting a JMSConsumerBean instance
Throws:
InvalidParameterException - if consumerBeanClass is not a vlid one...
Method Detail

getName

public java.lang.String getName()
Returns:
The name of this consumer

setName

public void setName(java.lang.String name)
Parameters:
name - The name of this consumer

getSelector

public java.lang.String getSelector()
Returns:
The selector expression for filtering messages

setSelector

public void setSelector(java.lang.String selector)
Parameters:
selector - The selector expression for filtering messages

getDestination

public java.lang.String getDestination()
Returns:
The reference of the JMS destination this consumer should listen

setDestination

public void setDestination(java.lang.String destination)
Parameters:
destination - The name of the JMS destination this consumer shoud listen

getConsumerBeanClass

public java.lang.String getConsumerBeanClass()
Returns:
The FQN of the Java class of wrapped JMSConsumerBean instance

setConsumerBeanClass

public void setConsumerBeanClass(java.lang.String consumerBeanClass)
                          throws InvalidParameterException
Give the FQN of Java class used for instanciating a JMSConsumerBean

Parameters:
consumerBeanClass - The FQN of the Java class of wrapped JMSConsumerBean instance
Throws:
InvalidParameterException - if the consumerBeanClass is not an instance of JMSConsumerBean

isActive

public boolean isActive()
Returns:
Whether the wrapped JMSConsumerBean is active or not

setActive

public void setActive(boolean active)
Parameters:
active - Flag telling whether wrapped JMSConsumerBean is active or not

isThreadSafe

public boolean isThreadSafe()
Returns:
Whether the wrapped JMSConsumerBean is thread safe or not

setThreadSafe

public void setThreadSafe(boolean threadSafe)
Parameters:
threadSafe - Flag telling whether wrapped JMSConsumerBean is thread safe or not

getConsumerParameterInfos

public java.util.List getConsumerParameterInfos()
Returns:
A set of JMSConsumerBeanParameterInfos for this consumer

setConsumerParameterInfos

public void setConsumerParameterInfos(java.util.List paramInfos)
Parameters:
paramInfos - A set of JMSConsumerBeanParameterInfos

addConsumerParameterInfo

public void addConsumerParameterInfo(JMSConsumerBeanParameterInfo paramInfo)
Convenient method for adding a parameter info to a consumer. This method manages the 2 sides of the association.

Parameters:
paramInfo - The parameter info to add to consumer

getJMSConsumerBean

public JMSConsumerBean getJMSConsumerBean()
                                   throws InvalidParameterException
Get the JMSConsumerBean wrapped within this infos container.

Returns:
The JMSConsumerBean instance wrapped by this info bean
Throws:
InvalidParameterException - if consumerBeanClass is not valid

instanciateConsumerBean

protected void instanciateConsumerBean()
                                throws InvalidParameterException
Try to instanciate wrapped consumerBean and configure it.

Throws:
InvalidParameterException - if consumerBeanClass is not valid.


Copyright © 2005-2008 Join. All Rights Reserved.