com.caucho.jca.ra
Class ConnectorResource

java.lang.Object
  extended by com.caucho.jca.ra.ConnectorResource
All Implemented Interfaces:
EnvironmentListener

public class ConnectorResource
extends java.lang.Object
implements EnvironmentListener

Configuration for the pattern.


Nested Class Summary
 class ConnectorResource.ConnectionFactory
           
 class ConnectorResource.ConnectionListener
           
 class ConnectorResource.ConnectorBean
           
 class ConnectorResource.EndpointFactory
           
 class ConnectorResource.ResourceAdapterConfig
           
 
Constructor Summary
ConnectorResource()
           
 
Method Summary
 void addConnectionFactory(ConnectorResource.ConnectionFactory factory)
          Configures a connection-factory
 void addInit(ContainerProgram init)
           
 void addMessageListener(ConnectorResource.ConnectionListener listener)
          Adds the configured connection-listener
 ConnectorResource.ConnectorBean createBean()
          Configures a connection-resource
 ConnectorResource.ConnectionFactory createConnectionFactory()
          Configures a connection-factory
 ConnectorResource.ConnectionListener createMessageListener()
          Configures a connection-listener
 ConnectorResource.ConnectorBean createResource()
          Configures a connection-resource
 ConnectorResource.ResourceAdapterConfig createResourceAdapter()
          Configures the resource adapter.
 void environmentBind(EnvironmentClassLoader loader)
          Handles the case where the environment bind phase
 void environmentConfigure(EnvironmentClassLoader loader)
          Handles the case where the environment config phase
 void environmentStart(EnvironmentClassLoader loader)
          Handles the case where the environment is starting (after init).
 void environmentStop(EnvironmentClassLoader loader)
          Handles the case where the environment is stopping
 java.lang.String getName()
          Gets the name
 java.lang.String getType()
          Gets the type
 void init()
          Initialize the resource.
 void initRA()
          Initializes the ra.
 void setClass(java.lang.String type)
          Sets the type of the connector.
 void setJndiName(java.lang.String name)
          Sets the name
 void setName(java.lang.String name)
          Sets the name
 void setResourceAdapter(ConnectorResource.ResourceAdapterConfig raConfig)
          Sets the configured resource adapter.
 void setType(java.lang.String type)
          Sets the type of the connector.
 void setURL(java.lang.String url)
          Sets the type of the connector using known types.
 void start()
          Start the resource.
 void stop()
          Stops the connector.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectorResource

public ConnectorResource()
Method Detail

setName

public void setName(java.lang.String name)
Sets the name


setJndiName

public void setJndiName(java.lang.String name)
Sets the name


getName

public java.lang.String getName()
Gets the name


setType

public void setType(java.lang.String type)
             throws java.lang.Exception
Sets the type of the connector.

Throws:
java.lang.Exception

setURL

public void setURL(java.lang.String url)
            throws java.lang.Exception
Sets the type of the connector using known types.

Throws:
java.lang.Exception

setClass

public void setClass(java.lang.String type)
              throws java.lang.Exception
Sets the type of the connector.

Throws:
java.lang.Exception

getType

public java.lang.String getType()
Gets the type


addInit

public void addInit(ContainerProgram init)

createResourceAdapter

public ConnectorResource.ResourceAdapterConfig createResourceAdapter()
                                                              throws ConfigException
Configures the resource adapter.

Throws:
ConfigException

setResourceAdapter

public void setResourceAdapter(ConnectorResource.ResourceAdapterConfig raConfig)
                        throws java.lang.Exception
Sets the configured resource adapter.

Throws:
java.lang.Exception

createConnectionFactory

public ConnectorResource.ConnectionFactory createConnectionFactory()
                                                            throws java.lang.Exception
Configures a connection-factory

Throws:
java.lang.Exception

addConnectionFactory

public void addConnectionFactory(ConnectorResource.ConnectionFactory factory)
                          throws java.lang.Exception
Configures a connection-factory

Throws:
java.lang.Exception

createMessageListener

public ConnectorResource.ConnectionListener createMessageListener()
                                                           throws java.lang.Exception
Configures a connection-listener

Throws:
java.lang.Exception

addMessageListener

public void addMessageListener(ConnectorResource.ConnectionListener listener)
                        throws java.lang.Throwable
Adds the configured connection-listener

Throws:
java.lang.Throwable

createBean

public ConnectorResource.ConnectorBean createBean()
Configures a connection-resource


createResource

public ConnectorResource.ConnectorBean createResource()
Configures a connection-resource


init

@PostConstruct
public void init()
          throws java.lang.Exception
Initialize the resource.

Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Start the resource.

Throws:
java.lang.Exception

initRA

public void initRA()
            throws java.lang.Exception
Initializes the ra.

Throws:
java.lang.Exception

stop

public void stop()
Stops the connector.


environmentConfigure

public void environmentConfigure(EnvironmentClassLoader loader)
Handles the case where the environment config phase

Specified by:
environmentConfigure in interface EnvironmentListener

environmentBind

public void environmentBind(EnvironmentClassLoader loader)
Handles the case where the environment bind phase

Specified by:
environmentBind in interface EnvironmentListener

environmentStart

public void environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).

Specified by:
environmentStart in interface EnvironmentListener

environmentStop

public void environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping

Specified by:
environmentStop in interface EnvironmentListener

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object