public class JmsProviderEndpoint extends ProviderEndpoint implements JmsEndpointType
| Modifier and Type | Class and Description |
|---|---|
class |
JmsProviderEndpoint.JmsTemplate102Util |
class |
JmsProviderEndpoint.JmsTemplateUtil |
loggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
JmsProviderEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Start this endpoint.
|
protected javax.jms.Destination |
chooseDestination(javax.jbi.messaging.MessageExchange exchange,
java.lang.Object message,
javax.jms.Session session,
DestinationChooser chooser,
java.lang.Object defaultDestination)
Choose a JMS destination given the chooser, a default destination and name
|
protected void |
createAndStartListener() |
protected JmsProviderMarshaler |
createDefaultMarshaler()
Creates the default marshaler for the endpoint if no custom marshaler has been set
|
protected org.springframework.jms.listener.AbstractMessageListenerContainer |
createListenerContainer()
Create the message listener container to receive response messages.
|
protected JmsProviderEndpoint.JmsTemplateUtil |
createTemplate()
Create the JMS template to be used to send the JMS messages.
|
void |
deactivate()
Stops this endpoint.
|
javax.jms.ConnectionFactory |
getConnectionFactory() |
int |
getDeliveryMode() |
javax.jms.Destination |
getDestination() |
protected javax.jms.Destination |
getDestination(javax.jbi.messaging.MessageExchange exchange,
java.lang.Object message,
javax.jms.Session session)
Retrieve the destination where the JMS message should be sent to.
|
DestinationChooser |
getDestinationChooser() |
java.lang.String |
getDestinationName() |
org.springframework.jms.support.destination.DestinationResolver |
getDestinationResolver() |
JmsProviderMarshaler |
getMarshaler() |
int |
getPriority() |
long |
getReceiveTimeout() |
javax.jms.Destination |
getReplyDestination() |
DestinationChooser |
getReplyDestinationChooser() |
java.lang.String |
getReplyDestinationName() |
org.apache.servicemix.store.Store |
getStore() |
org.apache.servicemix.store.StoreFactory |
getStoreFactory() |
long |
getTimeToLive() |
boolean |
isExplicitQosEnabled() |
boolean |
isJms102()
Determines if the provider used JMS 1.0.2 compliant APIs.
|
boolean |
isMessageIdEnabled() |
boolean |
isMessageTimestampEnabled() |
boolean |
isPreserveMessageQos() |
boolean |
isPubSubDomain() |
boolean |
isPubSubNoLocal() |
protected void |
onMessage(javax.jms.Message message)
Process a JMS response message.
|
void |
process(javax.jbi.messaging.MessageExchange exchange)
Process the incoming JBI exchange
|
protected void |
processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
Process an InOnly or RobustInOnly exchange.
|
protected void |
processInOnlyInSession(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jms.Session session)
Process an InOnly or RobustInOnly exchange inside a JMS session.
|
protected void |
processInOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
Process an InOut or InOptionalOut exchange.
|
protected void |
processInOutInSession(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jms.Session session)
Process an InOnly or RobustInOnly exchange inside a JMS session.
|
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Specifies the
ConnectionFactory used by the endpoint. |
void |
setDeliveryMode(int deliveryMode)
Specifies the JMS delivery mode used for the reply.
|
void |
setDestination(javax.jms.Destination destination)
Specifies the JMS
Destination used to send messages. |
void |
setDestinationChooser(DestinationChooser destinationChooser)
Specifies a class implementing logic for choosing the destination used
to send messages.
|
void |
setDestinationName(java.lang.String destinationName)
Specifies a string identifying the JMS destination used to send
messages.
|
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
Specifies the class implementing logic for converting strings into
destinations.
|
void |
setExplicitQosEnabled(boolean explicitQosEnabled)
Specifies if the QoS values specified for the endpoint are explicitly
used when a messages is sent.
|
void |
setJms102(boolean jms102)
Specifies if the provider uses JMS 1.0.2 compliant APIs.
|
void |
setMarshaler(JmsProviderMarshaler marshaler)
Specifies the class implementing the message marshaler.
|
void |
setMessageIdEnabled(boolean messageIdEnabled)
Specifies if your endpoint requires JMS message IDs.
|
void |
setMessageTimestampEnabled(boolean messageTimestampEnabled)
Specifies if your endpoints requires time stamps on its messages.
|
void |
setPreserveMessageQos(boolean preserveMessageQos)
Specifies whether we want to send message using the QoS settings
specified on the message instead in order to preserve message QoS.
|
void |
setPriority(int priority)
Specifies the priority assigned to the JMS messages.
|
void |
setPubSubDomain(boolean pubSubDomain)
Specifies if the destination is a topic.
|
void |
setPubSubNoLocal(boolean pubSubNoLocal)
Specifies if messages published by the listener's
Connection
are suppressed. |
void |
setReceiveTimeout(long receiveTimeout)
Specifies the timeout for receiving a message in milliseconds.
|
void |
setReplyDestination(javax.jms.Destination replyDestination)
Sets the reply destination.
|
void |
setReplyDestinationChooser(DestinationChooser replyDestinationChooser)
Specifies a class implementing logic for choosing the destination used
to recieve replies.
|
void |
setReplyDestinationName(java.lang.String replyDestinationName)
Sets the name of the reply destination.
|
void |
setStore(org.apache.servicemix.store.Store store)
Sets the store used to store JBI exchanges that are waiting for a response
JMS message.
|
void |
setStoreFactory(org.apache.servicemix.store.StoreFactory storeFactory)
Sets the store factory used to create the store.
|
void |
setTimeToLive(long timeToLive)
Specifies the number of milliseconds a message is valid.
|
void |
validate()
Validate this endpoint.
|
getRole, processInOutdone, fail, getChannel, getContext, getExchangeFactory, send, sendSync, start, stopgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic javax.jms.Destination getDestination()
public void setDestination(javax.jms.Destination destination)
Destination used to send messages.destination - the destinationpublic java.lang.String getDestinationName()
public void setDestinationName(java.lang.String destinationName)
DesitinationResolver.destinationName - the destination namepublic boolean isJms102()
true if the provider is JMS 1.0.2 compliantpublic void setJms102(boolean jms102)
false.jms102 - provider is JMS 1.0.2 compliant?public javax.jms.ConnectionFactory getConnectionFactory()
public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
ConnectionFactory used by the endpoint.connectionFactory - the connectionFactory to setpublic int getDeliveryMode()
public void setDeliveryMode(int deliveryMode)
PERSISTENT).deliveryMode - the JMS delivery modepublic DestinationChooser getDestinationChooser()
public void setDestinationChooser(DestinationChooser destinationChooser)
destinationChooser - the destination chooser for sending messagespublic DestinationChooser getReplyDestinationChooser()
public void setReplyDestinationChooser(DestinationChooser replyDestinationChooser)
replyDestinationChooser - the destination chooser used for the reply destinationpublic org.springframework.jms.support.destination.DestinationResolver getDestinationResolver()
public void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
DynamicDestinationResolver.destinationResolver - the destination resolver implementationpublic boolean isExplicitQosEnabled()
public void setExplicitQosEnabled(boolean explicitQosEnabled)
false.explicitQosEnabled - should the QoS values be sent?public JmsProviderMarshaler getMarshaler()
public void setMarshaler(JmsProviderMarshaler marshaler)
DefaultProviderMarshaler.marshaler - the marshaler implementationpublic boolean isMessageIdEnabled()
public void setMessageIdEnabled(boolean messageIdEnabled)
messageIdEnabled property to false causes the
endpoint to call its message producer's
setDisableMessageID() with a value of true.
The JMS broker is then given a hint that it does not need to generate
message IDs or add them to the messages from the endpoint. The JMS
broker can choose to accept the hint or ignore it.messageIdEnabled - the endpoint requires message IDs?public boolean isMessageTimestampEnabled()
public void setMessageTimestampEnabled(boolean messageTimestampEnabled)
messageTimeStampEnabled property to
false causes the endpoint to call its message producer's
setDisableMessageTimestamp() method with a value of
true. The JMS broker is then given a hint that it does not
need to generate message IDs or add them to the messages from the
endpoint. The JMS broker can choose to accept the hint or ignore it.messageTimestampEnabled - the endpoint requires time stamps?public int getPriority()
public void setPriority(int priority)
priority - the message prioritypublic boolean isPubSubDomain()
public void setPubSubDomain(boolean pubSubDomain)
true means the
destination is a topic. false means the destination is a
queue.pubSubDomain - the destination is a topic?public boolean isPubSubNoLocal()
public void setPubSubNoLocal(boolean pubSubNoLocal)
Connection
are suppressed. The default is false.pubSubNoLocal - messages are surpressed?public long getReceiveTimeout()
public void setReceiveTimeout(long receiveTimeout)
receiveTimeout - milliseconds to waitpublic long getTimeToLive()
public void setTimeToLive(long timeToLive)
timeToLive - number of milliseonds a message livespublic org.apache.servicemix.store.StoreFactory getStoreFactory()
public void setStoreFactory(org.apache.servicemix.store.StoreFactory storeFactory)
MemoryStoreFactory will be created and used instead.storeFactory - the factorypublic org.apache.servicemix.store.Store getStore()
public void setStore(org.apache.servicemix.store.Store store)
store - the storepublic javax.jms.Destination getReplyDestination()
public void setReplyDestination(javax.jms.Destination replyDestination)
replyDestinationChooser does not return any value.replyDestination - public java.lang.String getReplyDestinationName()
public void setReplyDestinationName(java.lang.String replyDestinationName)
replyDestination
using the destinationResolver when the endpoint starts if
the replyDestination has not been set.replyDestinationName - public boolean isPreserveMessageQos()
public void setPreserveMessageQos(boolean preserveMessageQos)
false.preserveMessageQos - should support per message QoS?public void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class ProviderEndpointexchange - java.lang.Exceptionprotected void processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
throws java.lang.Exception
processInOnlyInSession(javax.jbi.messaging.MessageExchange, javax.jbi.messaging.NormalizedMessage, javax.jms.Session)
method.processInOnly in class ProviderEndpointexchange - in - java.lang.Exceptionprotected void processInOnlyInSession(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jms.Session session)
throws java.lang.Exception
exchange - in - session - java.lang.Exceptionprotected void processInOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
throws java.lang.Exception
processInOutInSession(javax.jbi.messaging.MessageExchange, javax.jbi.messaging.NormalizedMessage, javax.jms.Session)
method.exchange - in - java.lang.Exceptionprotected void processInOutInSession(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jms.Session session)
throws java.lang.Exception
exchange - in - session - java.lang.Exceptionprotected void onMessage(javax.jms.Message message)
message - protected javax.jms.Destination getDestination(javax.jbi.messaging.MessageExchange exchange,
java.lang.Object message,
javax.jms.Session session)
throws javax.jms.JMSException
exchange - message - session - javax.jms.JMSExceptionprotected javax.jms.Destination chooseDestination(javax.jbi.messaging.MessageExchange exchange,
java.lang.Object message,
javax.jms.Session session,
DestinationChooser chooser,
java.lang.Object defaultDestination)
throws javax.jms.JMSException
exchange - message - session - chooser - defaultDestination - javax.jms.JMSExceptionpublic void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class ProviderEndpointjava.lang.Exceptionprotected void createAndStartListener()
throws java.lang.Exception
java.lang.Exceptionpublic void deactivate()
throws java.lang.Exception
deactivate in interface Endpointdeactivate in class ProviderEndpointjava.lang.Exceptionpublic void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class AbstractEndpointjavax.jbi.management.DeploymentExceptionprotected JmsProviderMarshaler createDefaultMarshaler()
protected JmsProviderEndpoint.JmsTemplateUtil createTemplate()
protected org.springframework.jms.listener.AbstractMessageListenerContainer createListenerContainer()
Copyright © 2005-2014 FuseSource. All Rights Reserved.