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.ra
Class ActiveMQResourceAdapter

    java.lang.Object
      org.codehaus.activemq.ra.ActiveMQResourceAdapter

All Implemented Interfaces:
  ResourceAdapter

public class ActiveMQResourceAdapter
extends Object
implements ResourceAdapter

Knows how to connect to one ActiveMQ server. It can then activate endpoints and deliver messages to those enpoints using the connection configure in the resource adapter.

Version:
  $Revision: 1.11 $

Constructor Summary
`ActiveMQResourceAdapter()`
`ActiveMQResourceAdapter(ConnectionFactory connectionFactory)`

Method Summary
`void` | `endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)`
`void` | `endpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec activationSpec)`
`BootstrapContext` | `getBootstrapContext()`
`String` | `getClientid()`
`String` | `getEndpointWorkerType()`
`ActiveMQConnectionRequestInfo` | `getInfo()`
`String` | `getPassword()`
`Connection` | `getPhysicalConnection()`
`String` | `getServerUrl()`
`String` | `getUserName()`
`XAResource[]` | `getXAResources(ActivationSpec[] activationSpecs)` We only connect to one resource manager per ResourceAdapter instance, so any ActivationSpec will return the same XAResource.
`Boolean` | `isXA()`
`static Connection` | `makeConnection(ConnectionFactory connectionFactory, ActiveMQConnectionRequestInfo info)` A helper method to create a new JMS connection from the connection request info.
`void` | `setClientid(String clientid)`
`void` | `setEndpointWorkerType(String endpointWorkerType)`
`void` | `setPassword(String password)`
`void` | `setServerUrl(String url)`
`void` | `setUserName(String userid)`
`void` | `setXA(Boolean xa)`
`void` | `start(BootstrapContext bootstrapContext)`
`void` | `stop()`

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

Constructor Detail

### ActiveMQResourceAdapter

    public ActiveMQResourceAdapter()

### ActiveMQResourceAdapter

    public ActiveMQResourceAdapter(ConnectionFactory connectionFactory)

Method Detail

### start

    public void start(BootstrapContext bootstrapContext)
               throws ResourceAdapterInternalException

  Specified by:
    `start` in interface `ResourceAdapter`
  Throws:
    `ResourceAdapterInternalException`
  See Also:
    `ResourceAdapter.start(javax.resource.spi.BootstrapContext)`

### makeConnection

    public static Connection makeConnection(ConnectionFactory connectionFactory,
                                            ActiveMQConnectionRequestInfo info)
                                     throws JMSException

  A helper method to create a new JMS connection from the connection request info. If no specific connection factory instance is passed in then the default ActiveMQ implementation is used

  Parameters:
    `connectionFactory` - an optional connection factory to use or null to use the default
    `info` - the connection request info
  Returns:
    a newly created connection
  Throws:
    `JMSException`

### getPhysicalConnection

    public Connection getPhysicalConnection()

  Returns:
    Returns the physicalConnection.

### stop

    public void stop()

  Specified by:
    `stop` in interface `ResourceAdapter`
  See Also:
    `ResourceAdapter.stop()`

### getBootstrapContext

    public BootstrapContext getBootstrapContext()

  Returns:

### endpointActivation

    public void endpointActivation(MessageEndpointFactory endpointFactory,
                                   ActivationSpec activationSpec)
                            throws ResourceException

  Specified by:
    `endpointActivation` in interface `ResourceAdapter`
  Throws:
    `ResourceException`
  See Also:
    `ResourceAdapter.endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)`

### endpointDeactivation

    public void endpointDeactivation(MessageEndpointFactory endpointFactory,
                                     ActivationSpec activationSpec)

  Specified by:
    `endpointDeactivation` in interface `ResourceAdapter`
  See Also:
    `ResourceAdapter.endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)`

### getXAResources

    public XAResource[] getXAResources(ActivationSpec[] activationSpecs)
                                throws ResourceException

  We only connect to one resource manager per ResourceAdapter instance, so any ActivationSpec will return the same XAResource.

  Specified by:
    `getXAResources` in interface `ResourceAdapter`
  Throws:
    `ResourceException`
  See Also:
    `ResourceAdapter.getXAResources(javax.resource.spi.ActivationSpec[])`

### getClientid

    public String getClientid()

  Returns:

### getPassword

    public String getPassword()

  Returns:

### getServerUrl

    public String getServerUrl()

  Returns:

### getUserName

    public String getUserName()

  Returns:

### setClientid

    public void setClientid(String clientid)

  Parameters:
    `clientid` -

### setPassword

    public void setPassword(String password)

  Parameters:
    `password` -

### setServerUrl

    public void setServerUrl(String url)

  Parameters:
    `url` -

### setUserName

    public void setUserName(String userid)

  Parameters:
    `userid` -

### isXA

    public Boolean isXA()

### setXA

    public void setXA(Boolean xa)

### getEndpointWorkerType

    public String getEndpointWorkerType()

  Returns:
    Returns the endpointWorkerType.

### setEndpointWorkerType

    public void setEndpointWorkerType(String endpointWorkerType)

  Parameters:
    `endpointWorkerType` - The endpointWorkerType to set.

### getInfo

    public ActiveMQConnectionRequestInfo getInfo()

  Returns:
    Returns the info.

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.