IBM Branch Transformation Toolkit Javadoc

com.ibm.connector2.sna.lu62
Class Lu62ManagedConnection

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

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

Object representing physical connection to the partner program.


Nested Class Summary
 class Lu62ManagedConnection.Lu62ConversationEventHandler
           
 
Constructor Summary
Lu62ManagedConnection(Lu62ManagedConnectionFactory connectionFactory, Lu62ConversationConfigurationProperties configurationProperties)
          Lu62ManagedConnection constructor
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          Adds a connection event listener to the ManagedConnection instance
 void addLu62EventListner(Lu62ConversationEventListener listener)
           
 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(Lu62Connection 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(Lu62Connection connectionHandle)
          Closes current application level handle
(package private)  void closeConnection(Lu62Connection lu62Connection)
           
 void destroy()
          Destroys the physical connection to the underlying resource manager
 boolean equals(java.lang.Object obj)
           
(package private)  void fireEvent(int i, javax.resource.cci.Connection connection)
           
 Lu62ConversationConfigurationProperties 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
 Lu62ManagedConnectionFactory getConnectionFactory()
          Returns a Lu62ManagedConnectionFactory instance associated with the Lu62ManagedConnection
 java.lang.Boolean getConversationClosed()
          Gets the conversationClosed indicator
 java.lang.Boolean getConversationEstablished()
          Gets the conversationEstablished indicator
 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.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()
           
(package private)  void removeConnection(Lu62Connection lu62Connection)
           
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          Removes an already registered connection event listener from the ManagedConnection instance
 void setConnectionFactory(Lu62ManagedConnectionFactory connectionFactory)
          Sets a Lu62ManagedConnectionFactory instance associated with the Lu62ManagedConnection
 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
 

Constructor Detail

Lu62ManagedConnection

public Lu62ManagedConnection(Lu62ManagedConnectionFactory connectionFactory,
                             Lu62ConversationConfigurationProperties configurationProperties)
                      throws javax.resource.ResourceException
Lu62ManagedConnection constructor

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

addLu62EventListner

public void addLu62EventListner(Lu62ConversationEventListener listener)

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(Lu62Connection 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.lu62.Lu62Connection
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(Lu62Connection connectionHandle)
Closes current application level handle

Parameters:
connectionHandle - com.ibm.connector2.sna.lu62.Lu62Connection

closeConnection

void closeConnection(Lu62Connection lu62Connection)
               throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

removeConnection

void removeConnection(Lu62Connection lu62Connection)
                throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException

fireEvent

void fireEvent(int i,
               javax.resource.cci.Connection connection)

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 Lu62ManagedConnectionFactory getConnectionFactory()
Returns a Lu62ManagedConnectionFactory instance associated with the Lu62ManagedConnection

Returns:
com.ibm.connector2.sna.lu62.Lu62ManagedConnectionFactory

setConnectionFactory

public void setConnectionFactory(Lu62ManagedConnectionFactory connectionFactory)
Sets a Lu62ManagedConnectionFactory instance associated with the Lu62ManagedConnection

Parameters:
connectionFactory - com.ibm.connector2.sna.lu62.Lu62ManagedConnectionFactory

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 Lu62ConversationConfigurationProperties getConfigurationProperties()
Gets the configurationProperties

Returns:
Returns a com.ibm.connector2.sna.lu62.host.Lu62ConversationConfigurationProperties

getConversationClosed

public java.lang.Boolean getConversationClosed()
Gets the conversationClosed indicator

Returns:
Returns a Boolean

getConversationEstablished

public java.lang.Boolean getConversationEstablished()
Gets the conversationEstablished indicator

Returns:
Returns a Boolean

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005