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:
  java.util.EventListener, java.io.Externalizable, HttpSessionActivationListener, java.io.Serializable

public class WebClient
extends java.lang.Object
implements HttpSessionActivationListener, java.io.Externalizable

Represents a messaging client used from inside a web container typically stored inside a HttpSession

Version:
  $Revision: 1.11 $
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `brokerUrlInitParam`
`static java.lang.String` | `connectionFactoryAttribute`
`static java.lang.String` | `embeddedBrokerInitParam`
`static java.lang.String` | `webClientAttribute`

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

Method Summary
`ActiveMQConnection` | `getConnection()`
`MessageConsumer` | `getConsumer(Destination destination)`
`Session` | `getSession()`
`static WebClient` | `getWebClient(HttpSession session)`
`static ConnectionFactory` | `initConnectionFactory(ServletContext servletContext)`
`void` | `readExternal(java.io.ObjectInput in)`
`void` | `send(Destination destination, Message message)`
`void` | `sessionDidActivate(HttpSessionEvent event)`
`void` | `sessionWillPassivate(HttpSessionEvent event)`
`void` | `start()`
`void` | `stop()`
`void` | `writeExternal(java.io.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 java.lang.String webClientAttribute

See Also:
  Constant Field Values

### connectionFactoryAttribute

    public static final java.lang.String connectionFactoryAttribute

See Also:
  Constant Field Values

### brokerUrlInitParam

    public static final java.lang.String brokerUrlInitParam

See Also:
  Constant Field Values

### embeddedBrokerInitParam

    public static final java.lang.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

### start

    public void start()
               throws JMSException

  Throws:
    `JMSException`

### stop

    public void stop()
              throws JMSException

  Throws:
    `JMSException`

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`
    `java.lang.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`

### initConnectionFactory

    public static ConnectionFactory initConnectionFactory(ServletContext servletContext)

### getConsumer

    public MessageConsumer getConsumer(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.