public class WebClient extends Object implements HttpSessionActivationListener, HttpSessionBindingListener, Externalizable
| Modifier and Type | Field and Description |
|---|---|
static String |
BROKER_URL_INIT_PARAM |
static String |
CONNECTION_FACTORY_ATTRIBUTE |
static String |
CONNECTION_FACTORY_OPTIMIZE_ACK_PARAM |
static String |
CONNECTION_FACTORY_PREFETCH_PARAM |
static String |
SELECTOR_NAME |
static String |
selectorName |
static String |
WEB_CLIENT_ATTRIBUTE |
| Constructor and Description |
|---|
WebClient() |
public static final String WEB_CLIENT_ATTRIBUTE
public static final String CONNECTION_FACTORY_ATTRIBUTE
public static final String CONNECTION_FACTORY_PREFETCH_PARAM
public static final String CONNECTION_FACTORY_OPTIMIZE_ACK_PARAM
public static final String BROKER_URL_INIT_PARAM
public static final String SELECTOR_NAME
public static String selectorName
public WebClient()
public static WebClient getWebClient(HttpServletRequest request)
request - is the current HTTP requestpublic static WebClient getWebClient(HttpSession session)
public static void initContext(ServletContext context)
public int getDeliveryMode()
public void setDeliveryMode(int deliveryMode)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public void closeConsumers()
public void close()
public boolean isClosed()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void send(Destination destination, Message message) throws JMSException
JMSExceptionpublic void send(Destination destination, Message message, boolean persistent, int priority, long timeToLive) throws JMSException
JMSExceptionpublic Session getSession() throws JMSException
JMSExceptionpublic Connection getConnection() throws JMSException
JMSExceptionprotected static void initConnectionFactory(ServletContext servletContext)
public MessageProducer getProducer() throws JMSException
JMSExceptionpublic void setProducer(MessageProducer producer)
public MessageConsumer getConsumer(Destination destination, String selector) throws JMSException
JMSExceptionpublic MessageConsumer getConsumer(Destination destination, String selector, boolean create) throws JMSException
JMSExceptionpublic void closeConsumer(Destination destination) throws JMSException
JMSExceptionpublic List<MessageConsumer> getConsumers()
protected Session createSession() throws JMSException
JMSExceptionpublic Semaphore getSemaphore()
public void sessionWillPassivate(HttpSessionEvent event)
sessionWillPassivate in interface HttpSessionActivationListenerpublic void sessionDidActivate(HttpSessionEvent event)
sessionDidActivate in interface HttpSessionActivationListenerpublic void valueBound(HttpSessionBindingEvent event)
valueBound in interface HttpSessionBindingListenerpublic void valueUnbound(HttpSessionBindingEvent event)
valueUnbound in interface HttpSessionBindingListenerprotected static WebClient createWebClient(HttpServletRequest request)
Copyright © 2005–2015 FuseSource, Corp.. All rights reserved.