WebClient (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.web.WebClient class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Nested Class Summary
`protected static class` | `WebClient.SessionConsumerPair`

Field Summary
`static String` | `brokerUrlInitParam`
`static String` | `connectionFactoryAttribute`
`static String` | `embeddedBrokerInitParam`
`static String` | `queueConsumersAttribute`
`static String` | `webClientAttribute`

Constructor Summary
`WebClient()` Only called by serialization
`WebClient(ServletContext context)`

Method Summary
`protected ActiveMQSession` | `createSession()`
`protected WebClient.SessionConsumerPair` | `createSessionConsumerPair(Destination destination)`
`ActiveMQConnection` | `getConnection()`
`MessageConsumer` | `getConsumer(Destination destination)`
`Session` | `getSession()`
`static WebClient` | `getWebClient(HttpSession session)`
`static ConnectionFactory` | `initConnectionFactory(ServletContext servletContext)`
`static void` | `initContext(ServletContext context)`
`static Map` | `initQueueConsumers(ServletContext context)`
`void` | `readExternal(ObjectInput in)`
`void` | `send(Destination destination, Message message)`
`void` | `sessionDidActivate(HttpSessionEvent event)`
`void` | `sessionWillPassivate(HttpSessionEvent event)`
`void` | `start()`
`void` | `stop()`
`void` | `writeExternal(ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### WebClient

    public WebClient()

  Only called by serialization

### WebClient

    public WebClient(ServletContext context)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.