org.objectweb.joram.client.connector
Class JoramAdapter

java.lang.Object
  extended byorg.objectweb.joram.client.connector.JoramAdapter
All Implemented Interfaces:
javax.resource.spi.ResourceAdapter, java.io.Serializable

public class JoramAdapter
extends java.lang.Object
implements javax.resource.spi.ResourceAdapter, java.io.Serializable

A JoramAdapter instance manages connectivities to an underlying JORAM server: outbound connectivity (JCA connection management contract) and inbound connectivity (asynchronous message delivery as specified by the JCA message inflow contract).

See Also:
Serialized Form

Constructor Summary
JoramAdapter()
          Constructs a JoramAdapter instance.
 
Method Summary
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, javax.resource.spi.ActivationSpec spec)
          Notifies the adapter to setup asynchronous message delivery for an application server endoint.
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, javax.resource.spi.ActivationSpec spec)
          Notifies the adapter to deactivate message delivery for a given endpoint.
 boolean equals(java.lang.Object o)
          Compares adapters according to their properties.
 java.lang.String getAdminFile()
           
 java.lang.Boolean getCollocatedServer()
           
 java.lang.String getHostName()
           
 java.lang.Boolean getPersistentPlatform()
           
 java.lang.String getPlatformConfigDir()
           
 java.lang.Short getServerId()
           
 java.lang.String getServerName()
           
 java.lang.Integer getServerPort()
           
 javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
          Returns XA resources given an array of ActivationSpec instances.
 int hashCode()
          Returns a code depending on the adapter properties.
 void setAdminFile(java.lang.String adminFile)
           
 void setCollocatedServer(java.lang.Boolean collocatedServer)
           
 void setHostName(java.lang.String hostName)
           
 void setPersistentPlatform(java.lang.Boolean persistentPlatform)
           
 void setPlatformConfigDir(java.lang.String platformConfigDir)
           
 void setServerId(java.lang.Short serverId)
           
 void setServerName(java.lang.String serverName)
           
 void setServerPort(java.lang.Integer serverPort)
           
 void start(javax.resource.spi.BootstrapContext ctx)
          Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.
 void stop()
          Notifies the adapter to terminate the connections it manages, and if needed, to shut down the collocated JORAM server.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoramAdapter

public JoramAdapter()
Constructs a JoramAdapter instance.

Method Detail

start

public void start(javax.resource.spi.BootstrapContext ctx)
           throws javax.resource.spi.ResourceAdapterInternalException
Initializes the adapter; starts, if needed, a collocated JORAM server, and if needed again, administers it.

Specified by:
start in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.ResourceAdapterInternalException - If the adapter could not be initialized.

stop

public void stop()
Notifies the adapter to terminate the connections it manages, and if needed, to shut down the collocated JORAM server.

Specified by:
stop in interface javax.resource.spi.ResourceAdapter

endpointActivation

public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                               javax.resource.spi.ActivationSpec spec)
                        throws javax.resource.ResourceException
Notifies the adapter to setup asynchronous message delivery for an application server endoint.

Specified by:
endpointActivation in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.IllegalStateException - If the adapter is either not started, or stopped.
javax.resource.NotSupportedException - If the provided activation parameters are invalid.
javax.resource.spi.CommException - If the JORAM server is not reachable.
java.lang.SecurityException - If connecting is not allowed.
javax.resource.ResourceException - Generic exception.

endpointDeactivation

public void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                 javax.resource.spi.ActivationSpec spec)
Notifies the adapter to deactivate message delivery for a given endpoint.

Specified by:
endpointDeactivation in interface javax.resource.spi.ResourceAdapter

getXAResources

public javax.transaction.xa.XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] specs)
                                                 throws javax.resource.ResourceException
Returns XA resources given an array of ActivationSpec instances.

Specified by:
getXAResources in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.IllegalStateException - If the adapter is either not started, or stopped.
javax.resource.NotSupportedException - If provided activation parameters are invalid.
javax.resource.spi.CommException - If the JORAM server is not reachable.
java.lang.SecurityException - If connecting is not allowed.
javax.resource.ResourceException - Generic exception.

hashCode

public int hashCode()
Returns a code depending on the adapter properties.


equals

public boolean equals(java.lang.Object o)
Compares adapters according to their properties.


setPlatformConfigDir

public void setPlatformConfigDir(java.lang.String platformConfigDir)

setPersistentPlatform

public void setPersistentPlatform(java.lang.Boolean persistentPlatform)

setServerId

public void setServerId(java.lang.Short serverId)

setServerName

public void setServerName(java.lang.String serverName)

setAdminFile

public void setAdminFile(java.lang.String adminFile)

setCollocatedServer

public void setCollocatedServer(java.lang.Boolean collocatedServer)

setHostName

public void setHostName(java.lang.String hostName)

setServerPort

public void setServerPort(java.lang.Integer serverPort)

getPlatformConfigDir

public java.lang.String getPlatformConfigDir()

getPersistentPlatform

public java.lang.Boolean getPersistentPlatform()

getServerId

public java.lang.Short getServerId()

getServerName

public java.lang.String getServerName()

getAdminFile

public java.lang.String getAdminFile()

getCollocatedServer

public java.lang.Boolean getCollocatedServer()

getHostName

public java.lang.String getHostName()

getServerPort

public java.lang.Integer getServerPort()


Copyright © 2004 Scalagent - All rights reserved