org.codehaus.activemq.web
Class WebClient
java.lang.Object
org.codehaus.activemq.web.WebClient
- All Implemented Interfaces:
- EventListener, Externalizable, HttpSessionActivationListener, Serializable
- public class WebClient
- extends Object
- implements HttpSessionActivationListener, Externalizable
Represents a messaging client used from inside a web container
typically stored inside a HttpSession
- Version:
- $Revision: 1.12 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
webClientAttribute
public static final String webClientAttribute
- See Also:
- Constant Field Values
connectionFactoryAttribute
public static final String connectionFactoryAttribute
- See Also:
- Constant Field Values
queueConsumersAttribute
public static final String queueConsumersAttribute
- See Also:
- Constant Field Values
brokerUrlInitParam
public static final String brokerUrlInitParam
- See Also:
- Constant Field Values
embeddedBrokerInitParam
public static final String embeddedBrokerInitParam
- See Also:
- Constant Field Values
WebClient
public WebClient()
- Only called by serialization
WebClient
public WebClient(ServletContext context)
getWebClient
public static WebClient getWebClient(HttpSession session)
- Returns:
- the web client for the current HTTP session or null if there is not a web client created yet
initContext
public static void initContext(ServletContext context)
start
public void start()
throws JMSException
- Throws:
JMSException
stop
public void stop()
throws JMSException
- Throws:
JMSException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
ClassNotFoundException
send
public void send(Destination destination,
Message message)
throws JMSException
- Throws:
JMSException
getSession
public Session getSession()
throws JMSException
- Throws:
JMSException
getConnection
public ActiveMQConnection getConnection()
throws JMSException
- Throws:
JMSException
sessionWillPassivate
public void sessionWillPassivate(HttpSessionEvent event)
- Specified by:
sessionWillPassivate
in interface HttpSessionActivationListener
sessionDidActivate
public void sessionDidActivate(HttpSessionEvent event)
- Specified by:
sessionDidActivate
in interface HttpSessionActivationListener
initQueueConsumers
public static Map initQueueConsumers(ServletContext context)
initConnectionFactory
public static ConnectionFactory initConnectionFactory(ServletContext servletContext)
getConsumer
public MessageConsumer getConsumer(Destination destination)
throws JMSException
- Throws:
JMSException
createSession
protected ActiveMQSession createSession()
throws JMSException
- Throws:
JMSException
createSessionConsumerPair
protected WebClient.SessionConsumerPair createSessionConsumerPair(Destination destination)
throws JMSException
- Throws:
JMSException
Copyright © 2004 Protique, Ltd.. All Rights Reserved.