|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.actions.AbstractActionLifecycle org.jboss.soa.esb.actions.AbstractActionPipelineProcessor org.jboss.soa.esb.actions.routing.AbstractRouter org.jboss.soa.esb.actions.routing.JMSRouter
public class JMSRouter
JMS Routing Action Processor.
Sample Action Configuration:<action class="org.jboss.soa.esb.actions.routing.JMSRouter"> <property name="jndiName" value="queue/A"/> </action> Option properties: <property name="unwrap" value="false"/> <property name="jndi-context-factory" value="org.jnp.interfaces.NamingContextFactory"/> <property name="jndi-URL" value="127.0.0.1:1099"/> <property name="jndi-pkg-prefix" value="org.jboss.naming:org.jnp.interfaces"/> <property name="connection-factory" value="ConnectionFactory"/> <property name="persistent" value="true"/> <property name="priority" value="javax.jms.Message.DEFAULT_PRIORITY"/> <property name="time-to-live" value="javax.jms.Message.DEFAULT_TIME_TO_LIVE"/> <property name="security-principal" value="username"/> <property name="security-credential" value="pasword"/> <property name="message-prop->prop-name<="> value="prop-value<" />Description of configuration attribues:
Field Summary | |
---|---|
static java.lang.String |
PERSISTENT_ATTR
Constant used in configuration |
static java.lang.String |
PRIORITY_ATTR
Constant used in configuration |
static java.lang.String |
SECURITY_CREDITIAL
Security credential used when creating the JMS connection |
static java.lang.String |
SECURITY_PRINCIPAL
Security principal used when creating the JMS connection |
static java.lang.String |
TIME_TO_LIVE_ATTR
Constant used in configuration |
Fields inherited from class org.jboss.soa.esb.actions.routing.AbstractRouter |
---|
payloadProxy, unwrap |
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor |
---|
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD |
Constructor Summary | |
---|---|
JMSRouter(ConfigTree propertiesTree)
Sole public constructor. |
Method Summary | |
---|---|
protected javax.jms.Message |
createJMSMessageWithObjectType(java.lang.Object objectFromBody)
|
protected javax.jms.Message |
createObjectMessage(java.lang.Object message)
|
protected void |
createQueueSetup(java.lang.String queueName)
|
protected void |
createQueueSetup(java.lang.String queueName,
java.lang.String jndiContextFactory,
java.lang.String jndiUrl,
java.lang.String jndiPkgPrefix,
java.lang.String connectionFactory,
java.lang.String securityPrincipal,
java.lang.String securityCredential)
|
protected void |
finalize()
|
java.lang.String |
getConnectionFactory()
|
java.lang.String |
getContextFactoryName()
|
java.io.Serializable |
getErrorNotification(Message message)
|
java.lang.String |
getJndiPkgPrefix()
|
java.lang.String |
getJndiURL()
|
java.io.Serializable |
getOkNotification(Message message)
|
int |
getPriority()
The priority used when sending messages. |
long |
getTimeToLive()
The time-to-live used when sending messages. |
boolean |
isDeliveryModePersistent()
The delivery mode in use. |
Message |
process(Message message)
Will simply pass the message to the route method unmodified. |
void |
route(java.lang.Object message)
Route the message or message payload. |
protected void |
send(javax.jms.Message jmsMessage)
|
protected void |
setJMSProperties(Message fromESBMessage,
javax.jms.Message toJMSMessage)
This method will set appropriate JMSProperties on the outgoing JMS Message instance. |
protected void |
setJMSReplyTo(javax.jms.Message jmsMessage,
Message esbMessage)
|
Methods inherited from class org.jboss.soa.esb.actions.routing.AbstractRouter |
---|
getPayloadProxy |
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor |
---|
processException, processSuccess |
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle |
---|
destroy, initialise |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.soa.esb.actions.ActionLifecycle |
---|
destroy, initialise |
Field Detail |
---|
public static final java.lang.String PERSISTENT_ATTR
public static final java.lang.String PRIORITY_ATTR
public static final java.lang.String TIME_TO_LIVE_ATTR
public static final java.lang.String SECURITY_PRINCIPAL
public static final java.lang.String SECURITY_CREDITIAL
Constructor Detail |
---|
public JMSRouter(ConfigTree propertiesTree) throws ConfigurationException, javax.naming.NamingException, javax.jms.JMSException
propertiesTree
- Action properties.
ConfigurationException
- Queue name not configured.
javax.jms.JMSException
- Unable to configure JMS destination.
javax.naming.NamingException
- Unable to configure JMS destination.Method Detail |
---|
public Message process(Message message) throws ActionProcessingException
process
in interface ActionPipelineProcessor
process
in class AbstractRouter
message
- The current message being processed.
null
which will case the action pipeline processing to stop
ActionProcessingException
- for errors during processing.public void route(java.lang.Object message) throws ActionProcessingException
AbstractRouter
route
in class AbstractRouter
message
- The object to route.
ActionProcessingException
- Exception during routing operation.protected javax.jms.Message createJMSMessageWithObjectType(java.lang.Object objectFromBody) throws javax.jms.JMSException
javax.jms.JMSException
protected void send(javax.jms.Message jmsMessage) throws javax.jms.JMSException
javax.jms.JMSException
protected void setJMSProperties(Message fromESBMessage, javax.jms.Message toJMSMessage) throws javax.jms.JMSException
#setJmsPropertiesStrategy(JMSPropertiesSetter)
.
See JMSPropertiesSetter
for more info.
javax.jms.JMSException
protected javax.jms.Message createObjectMessage(java.lang.Object message) throws javax.jms.JMSException
javax.jms.JMSException
public java.io.Serializable getOkNotification(Message message)
public java.io.Serializable getErrorNotification(Message message)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected void createQueueSetup(java.lang.String queueName) throws ConfigurationException
ConfigurationException
protected void createQueueSetup(java.lang.String queueName, java.lang.String jndiContextFactory, java.lang.String jndiUrl, java.lang.String jndiPkgPrefix, java.lang.String connectionFactory, java.lang.String securityPrincipal, java.lang.String securityCredential) throws ConfigurationException
ConfigurationException
protected void setJMSReplyTo(javax.jms.Message jmsMessage, Message esbMessage) throws java.net.URISyntaxException, javax.jms.JMSException, javax.naming.NamingException, org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException
java.net.URISyntaxException
javax.jms.JMSException
javax.naming.NamingException
org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException
public boolean isDeliveryModePersistent()
public int getPriority()
public long getTimeToLive()
public java.lang.String getContextFactoryName()
public java.lang.String getJndiURL()
public java.lang.String getJndiPkgPrefix()
public java.lang.String getConnectionFactory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |