IBM Branch Transformation Toolkit Javadoc

com.ibm.connector2.sna.lu0
Class Lu0ManagedConnection

java.lang.Object
  extended bycom.ibm.connector2.sna.lu0.Lu0ManagedConnection
All Implemented Interfaces:
javax.resource.spi.ManagedConnection

public class Lu0ManagedConnection
extends java.lang.Object
implements javax.resource.spi.ManagedConnection

Object representing physical connection to the EIS system.


Nested Class Summary
 class Lu0ManagedConnection.Lu0SessionEventHandler
           
 
Field Summary
(package private)  Lu0Message _lastMessageRead
           
 
Constructor Summary
Lu0ManagedConnection(Lu0ManagedConnectionFactory connectionFactory, Lu0SnaSessionConfigurationProperties configurationProperties)
          Lu0ManagedConnection constructor
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          Adds a connection event listener to the ManagedConnection instance
 void associateConnection(java.lang.Object handle)
          Used by the container to change the association of an application-level connection handle with a ManagedConneciton instance
protected  boolean call(Lu0Connection currentConnection, javax.resource.cci.InteractionSpec interactionSpec, javax.resource.cci.Record input, javax.resource.cci.Record output)
          Executes EIS interaction
 void cleanup()
          Application server calls this method to force any cleanup on the ManagedConnection instance
protected  void close(Lu0Connection connectionHandle)
          Closes current application level handle
 void destroy()
          Destroys the physical connection to the underlying resource manager
 boolean equals(java.lang.Object obj)
           
 Lu0SnaSessionConfigurationProperties getConfigurationProperties()
          Gets the configurationProperties
 java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo requestInfo)
          Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance
 Lu0ManagedConnectionFactory getConnectionFactory()
          Returns a LU0ManagedConnectionFactory instance associated with the Lu0ManagedConnection
 javax.resource.spi.LocalTransaction getLocalTransaction()
          Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection
 java.io.PrintWriter getLogWriter()
          Returns LogWriter
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
          Gets the metadata information for this connection's underlying EIS resource manager instance
 javax.resource.spi.security.PasswordCredential getPasswordCredential()
          Gets the passwordCredential
 java.lang.Boolean getSessionClosed()
          Gets the sessionClosed indicator
 java.lang.Boolean getSessionEstablished()
          Gets the sessionEstablished indicator
 java.lang.String getUserName()
          Gets the userName
 javax.transaction.xa.XAResource getXAResource()
          Returns an javax.transaction.xa.XAresource instance
 boolean hasActiveConnectionHandle()
          returns true if ManagedConnection has active application level connection handle
 int hashCode()
           
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          Removes an already registered connection event listener from the ManagedConnection instance
 void setConnectionFactory(Lu0ManagedConnectionFactory connectionFactory)
          Sets a LU0ManagedConnectionFactory instance associated with the Lu0ManagedConnection
 void setLogWriter(java.io.PrintWriter out)
          Sets LogWriter
 void setUserName(java.lang.String userName)
          Sets the userName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_lastMessageRead

Lu0Message _lastMessageRead
Constructor Detail

Lu0ManagedConnection

public Lu0ManagedConnection(Lu0ManagedConnectionFactory connectionFactory,
                            Lu0SnaSessionConfigurationProperties configurationProperties)
                     throws javax.resource.ResourceException
Lu0ManagedConnection constructor

Parameters:
connectionFactory - javax.resource.spi.ManagedConnectionFactory
configurationProperties - com.ibm.connector2.sna.lu0.host.Lu0SnaSessionConfigurationProperties
Method Detail

addConnectionEventListener

public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Adds a connection event listener to the ManagedConnection instance

Specified by:
addConnectionEventListener in interface javax.resource.spi.ManagedConnection
Parameters:
listener - javax.resource.spi.ConnectionEventListener

associateConnection

public void associateConnection(java.lang.Object handle)
                         throws javax.resource.ResourceException
Used by the container to change the association of an application-level connection handle with a ManagedConneciton instance

Specified by:
associateConnection in interface javax.resource.spi.ManagedConnection
Parameters:
handle - java.lang.Object
Throws:
javax.resource.ResourceException

cleanup

public void cleanup()
             throws javax.resource.ResourceException
Application server calls this method to force any cleanup on the ManagedConnection instance

Specified by:
cleanup in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

call

protected boolean call(Lu0Connection currentConnection,
                       javax.resource.cci.InteractionSpec interactionSpec,
                       javax.resource.cci.Record input,
                       javax.resource.cci.Record output)
                throws javax.resource.ResourceException
Executes EIS interaction

Parameters:
currentConnection - com.ibm.connector2.sna.lu0.Lu0Connection
interactionSpec - javax.resource.cci.InteractionSpec
input - javax.resource.cci.Record
output - javax.resource.cci.Record
Returns:
Returns a boolean
Throws:
javax.resource.ResourceException

close

protected void close(Lu0Connection connectionHandle)
              throws javax.resource.ResourceException
Closes current application level handle

Parameters:
connectionHandle - com.ibm.connector2.sna.lu0.Lu0Connection
Throws:
javax.resource.ResourceException

destroy

public void destroy()
             throws javax.resource.ResourceException
Destroys the physical connection to the underlying resource manager

Specified by:
destroy in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

getConnection

public java.lang.Object getConnection(javax.security.auth.Subject subject,
                                      javax.resource.spi.ConnectionRequestInfo requestInfo)
                               throws javax.resource.ResourceException
Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance

Specified by:
getConnection in interface javax.resource.spi.ManagedConnection
Parameters:
subject - javax.security.auth.Subject
requestInfo - javax.resource.spi.ConnectionRequestInfo
Throws:
javax.resource.ResourceException

hasActiveConnectionHandle

public boolean hasActiveConnectionHandle()
returns true if ManagedConnection has active application level connection handle

Returns:
boolean

getLocalTransaction

public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection

Specified by:
getLocalTransaction in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.NotSupportedException
javax.resource.ResourceException

getLogWriter

public java.io.PrintWriter getLogWriter()
Returns LogWriter

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnection
Returns:
java.io.PrintWriter

getMetaData

public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                         throws javax.resource.ResourceException
Gets the metadata information for this connection's underlying EIS resource manager instance

Specified by:
getMetaData in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.NotSupportedException
javax.resource.ResourceException

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException
Returns an javax.transaction.xa.XAresource instance

Specified by:
getXAResource in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.NotSupportedException
javax.resource.ResourceException

removeConnectionEventListener

public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Removes an already registered connection event listener from the ManagedConnection instance

Specified by:
removeConnectionEventListener in interface javax.resource.spi.ManagedConnection
Parameters:
listener - javax.resource.spi.ConnectionEventListener

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
Sets LogWriter

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnection
Parameters:
out - java.io.PrintWriter

getUserName

public java.lang.String getUserName()
Gets the userName

Returns:
Returns a String

setUserName

public void setUserName(java.lang.String userName)
Sets the userName

Parameters:
userName -

getConnectionFactory

public Lu0ManagedConnectionFactory getConnectionFactory()
Returns a LU0ManagedConnectionFactory instance associated with the Lu0ManagedConnection

Returns:
com.ibm.connector2.sna.lu0.LU0ManagedConnectionFactory

setConnectionFactory

public void setConnectionFactory(Lu0ManagedConnectionFactory connectionFactory)
Sets a LU0ManagedConnectionFactory instance associated with the Lu0ManagedConnection

Parameters:
connectionFactory - com.ibm.connector2.sna.lu0.LU0ManagedConnectionFactory

getPasswordCredential

public javax.resource.spi.security.PasswordCredential getPasswordCredential()
Gets the passwordCredential

Returns:
Returns a javax.resource.spi.security.PasswordCredential

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object obj)

getConfigurationProperties

public Lu0SnaSessionConfigurationProperties getConfigurationProperties()
Gets the configurationProperties

Returns:
Returns a com.ibm.connector2.sna.lu0.host.Lu0SnaSessionConfigurationProperties

getSessionClosed

public java.lang.Boolean getSessionClosed()
Gets the sessionClosed indicator

Returns:
Returns a Boolean

getSessionEstablished

public java.lang.Boolean getSessionEstablished()
Gets the sessionEstablished indicator

Returns:
Returns a Boolean

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005