|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.network.jms.JmsConnector
public abstract class JmsConnector
This bridge joins the gap between foreign JMS providers and ActiveMQ As some JMS providers are still only in compliance with JMS v1.0.1 , this bridge itself aimed to be in compliance with the JMS 1.0.2 specification.
Field Summary | |
---|---|
protected java.util.concurrent.ThreadPoolExecutor |
connectionSerivce
|
protected ActiveMQConnectionFactory |
embeddedConnectionFactory
|
protected java.util.concurrent.atomic.AtomicBoolean |
failed
|
protected java.util.concurrent.atomic.AtomicReference<javax.jms.Connection> |
foreignConnection
|
protected java.util.concurrent.atomic.AtomicBoolean |
foreignSideInitialized
|
protected JmsMesageConvertor |
inboundMessageConvertor
|
protected java.util.concurrent.atomic.AtomicBoolean |
initialized
|
protected org.springframework.jndi.JndiTemplate |
jndiLocalTemplate
|
protected org.springframework.jndi.JndiTemplate |
jndiOutboundTemplate
|
protected java.lang.String |
localClientId
|
protected java.util.concurrent.atomic.AtomicReference<javax.jms.Connection> |
localConnection
|
protected java.lang.String |
localPassword
|
protected java.util.concurrent.atomic.AtomicBoolean |
localSideInitialized
|
protected java.lang.String |
localUsername
|
protected java.lang.String |
outboundClientId
|
protected JmsMesageConvertor |
outboundMessageConvertor
|
protected java.lang.String |
outboundPassword
|
protected java.lang.String |
outboundUsername
|
protected LRUCache<javax.jms.Destination,DestinationBridge> |
replyToBridges
|
protected int |
replyToDestinationCacheSize
|
protected java.util.concurrent.atomic.AtomicBoolean |
started
|
Constructor Summary | |
---|---|
JmsConnector()
|
Method Summary | |
---|---|
protected void |
addInboundBridge(DestinationBridge bridge)
|
protected void |
addOutboundBridge(DestinationBridge bridge)
|
void |
clearBridges()
|
protected abstract javax.jms.Destination |
createReplyToBridge(javax.jms.Destination destination,
javax.jms.Connection consumerConnection,
javax.jms.Connection producerConnection)
|
protected boolean |
doConnectorInit()
|
javax.jms.Connection |
getForeignConnection()
|
JmsMesageConvertor |
getInboundMessageConvertor()
|
org.springframework.jndi.JndiTemplate |
getJndiLocalTemplate()
|
org.springframework.jndi.JndiTemplate |
getJndiOutboundTemplate()
|
java.lang.String |
getLocalClientId()
|
javax.jms.Connection |
getLocalConnection()
|
java.lang.String |
getLocalPassword()
|
java.lang.String |
getLocalUsername()
|
java.lang.String |
getName()
|
java.lang.String |
getOutboundClientId()
|
JmsMesageConvertor |
getOutboundMessageConvertor()
|
java.lang.String |
getOutboundPassword()
|
java.lang.String |
getOutboundUsername()
|
ReconnectionPolicy |
getReconnectionPolicy()
|
int |
getReplyToDestinationCacheSize()
|
boolean |
init()
|
protected abstract void |
initializeForeignConnection()
Performs the work of connection to the foreign side of the Connection. |
protected abstract void |
initializeLocalConnection()
Performs the work of connection to the local side of the Connection. |
boolean |
isConnected()
|
boolean |
isFailed()
|
protected void |
removeInboundBridge(DestinationBridge bridge)
|
protected void |
removeOutboundBridge(DestinationBridge bridge)
|
void |
setBrokerService(BrokerService service)
One way to configure the local connection - this is called by The BrokerService when the Connector is embedded |
void |
setInboundMessageConvertor(JmsMesageConvertor jmsMessageConvertor)
|
void |
setJndiLocalTemplate(org.springframework.jndi.JndiTemplate jndiTemplate)
|
void |
setJndiOutboundTemplate(org.springframework.jndi.JndiTemplate jndiOutboundTemplate)
|
void |
setLocalClientId(java.lang.String localClientId)
|
void |
setLocalPassword(java.lang.String localPassword)
|
void |
setLocalUsername(java.lang.String localUsername)
|
void |
setName(java.lang.String name)
|
void |
setOutboundClientId(java.lang.String outboundClientId)
|
void |
setOutboundMessageConvertor(JmsMesageConvertor outboundMessageConvertor)
|
void |
setOutboundPassword(java.lang.String outboundPassword)
|
void |
setOutboundUsername(java.lang.String outboundUsername)
|
void |
setReconnectionPolicy(ReconnectionPolicy policy)
|
void |
setReplyToDestinationCacheSize(int replyToDestinationCacheSize)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.springframework.jndi.JndiTemplate jndiLocalTemplate
protected org.springframework.jndi.JndiTemplate jndiOutboundTemplate
protected JmsMesageConvertor inboundMessageConvertor
protected JmsMesageConvertor outboundMessageConvertor
protected java.util.concurrent.atomic.AtomicBoolean initialized
protected java.util.concurrent.atomic.AtomicBoolean localSideInitialized
protected java.util.concurrent.atomic.AtomicBoolean foreignSideInitialized
protected java.util.concurrent.atomic.AtomicBoolean started
protected java.util.concurrent.atomic.AtomicBoolean failed
protected java.util.concurrent.atomic.AtomicReference<javax.jms.Connection> foreignConnection
protected java.util.concurrent.atomic.AtomicReference<javax.jms.Connection> localConnection
protected ActiveMQConnectionFactory embeddedConnectionFactory
protected int replyToDestinationCacheSize
protected java.lang.String outboundUsername
protected java.lang.String outboundPassword
protected java.lang.String localUsername
protected java.lang.String localPassword
protected java.lang.String outboundClientId
protected java.lang.String localClientId
protected LRUCache<javax.jms.Destination,DestinationBridge> replyToBridges
protected java.util.concurrent.ThreadPoolExecutor connectionSerivce
Constructor Detail |
---|
public JmsConnector()
Method Detail |
---|
public boolean init()
protected boolean doConnectorInit()
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public void clearBridges()
protected abstract javax.jms.Destination createReplyToBridge(javax.jms.Destination destination, javax.jms.Connection consumerConnection, javax.jms.Connection producerConnection)
public void setBrokerService(BrokerService service)
service
- public javax.jms.Connection getLocalConnection()
public javax.jms.Connection getForeignConnection()
public org.springframework.jndi.JndiTemplate getJndiLocalTemplate()
public void setJndiLocalTemplate(org.springframework.jndi.JndiTemplate jndiTemplate)
jndiTemplate
- The jndiTemplate to set.public org.springframework.jndi.JndiTemplate getJndiOutboundTemplate()
public void setJndiOutboundTemplate(org.springframework.jndi.JndiTemplate jndiOutboundTemplate)
jndiOutboundTemplate
- The jndiOutboundTemplate to set.public JmsMesageConvertor getInboundMessageConvertor()
public void setInboundMessageConvertor(JmsMesageConvertor jmsMessageConvertor)
inboundMessageConvertor
- The inboundMessageConvertor to set.public JmsMesageConvertor getOutboundMessageConvertor()
public void setOutboundMessageConvertor(JmsMesageConvertor outboundMessageConvertor)
outboundMessageConvertor
- The outboundMessageConvertor to set.public int getReplyToDestinationCacheSize()
public void setReplyToDestinationCacheSize(int replyToDestinationCacheSize)
replyToDestinationCacheSize
- The replyToDestinationCacheSize to set.public java.lang.String getLocalPassword()
public void setLocalPassword(java.lang.String localPassword)
localPassword
- The localPassword to set.public java.lang.String getLocalUsername()
public void setLocalUsername(java.lang.String localUsername)
localUsername
- The localUsername to set.public java.lang.String getOutboundPassword()
public void setOutboundPassword(java.lang.String outboundPassword)
outboundPassword
- The outboundPassword to set.public java.lang.String getOutboundUsername()
public void setOutboundUsername(java.lang.String outboundUsername)
outboundUsername
- The outboundUsername to set.public java.lang.String getOutboundClientId()
public void setOutboundClientId(java.lang.String outboundClientId)
outboundClientId
- the outboundClientId to setpublic java.lang.String getLocalClientId()
public void setLocalClientId(java.lang.String localClientId)
localClientId
- the localClientId to setpublic ReconnectionPolicy getReconnectionPolicy()
public void setReconnectionPolicy(ReconnectionPolicy policy)
policy
- The new reconnection policy this JmsConnector
should use.public boolean isConnected()
JmsConnector
is connected to both brokers.protected void addInboundBridge(DestinationBridge bridge)
protected void addOutboundBridge(DestinationBridge bridge)
protected void removeInboundBridge(DestinationBridge bridge)
protected void removeOutboundBridge(DestinationBridge bridge)
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean isFailed()
protected abstract void initializeLocalConnection() throws java.lang.Exception
This creates the initial connection to the local end of the JmsConnector
and then sets up all the destination bridges with the information needed to bridge
on the local side of the connection.
java.lang.Exception
- if the connection cannot be established for any reason.protected abstract void initializeForeignConnection() throws java.lang.Exception
This creates the initial connection to the foreign end of the JmsConnector
and then sets up all the destination bridges with the information needed to bridge
on the foreign side of the connection.
java.lang.Exception
- if the connection cannot be established for any reason.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |