com.caucho.jca.ra
Class ConnectorConfig

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

public class ConnectorConfig
extends java.lang.Object
implements EnvironmentListener

Configuration for the pattern.


Nested Class Summary
 class ConnectorConfig.ConnectionFactory
           
 class ConnectorConfig.ConnectionListener
           
 class ConnectorConfig.ConnectorBean
           
 class ConnectorConfig.EndpointFactory
           
 class ConnectorConfig.ResourceAdapterConfig
           
 
Constructor Summary
ConnectorConfig()
           
 
Method Summary
 void addConnectionFactory(ConnectorConfig.ConnectionFactory factory)
          Configures a connection-factory
 void addInit(ContainerProgram init)
           
 void addMessageListener(ConnectorConfig.ConnectionListener listener)
          Adds the configured connection-listener
 ConnectorConfig.ConnectorBean createBean()
          Configures a connection-resource
 ConnectorConfig.ConnectionFactory createConnectionFactory()
          Configures a connection-factory
 ConnectorConfig.ConnectionListener createMessageListener()
          Configures a connection-listener
 ConnectorConfig.ConnectorBean createResource()
          Configures a connection-resource
 ConnectorConfig.ResourceAdapterConfig createResourceAdapter()
          Configures the resource adapter.
 void environmentBind(EnvironmentClassLoader loader)
          Handles the bind phase.
 void environmentConfigure(EnvironmentClassLoader loader)
          Handles the configure 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(ConnectorConfig.ResourceAdapterConfig raConfig)
          Sets the configured resource adapter.
 void setType(java.lang.String type)
          Sets the type of the connector.
 void setURI(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

ConnectorConfig

public ConnectorConfig()
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

setURI

public void setURI(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 ConnectorConfig.ResourceAdapterConfig createResourceAdapter()
                                                            throws ConfigException
Configures the resource adapter.

Throws:
ConfigException

setResourceAdapter

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

Throws:
java.lang.Exception

createConnectionFactory

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

Throws:
java.lang.Exception

addConnectionFactory

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

Throws:
java.lang.Exception

createMessageListener

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

Throws:
java.lang.Exception

addMessageListener

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

Throws:
java.lang.Throwable

createBean

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


createResource

public ConnectorConfig.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 configure phase.

Specified by:
environmentConfigure in interface EnvironmentListener

environmentBind

public void environmentBind(EnvironmentClassLoader loader)
Handles the 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