IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.samples.business.sna.lu0
Class DummyLu0ManagedConnection

java.lang.Object
  extended bycom.ibm.btt.samples.business.sna.lu0.DummyLu0ManagedConnection
All Implemented Interfaces:
javax.resource.spi.ManagedConnection

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

Object representing physical connection to the EIS system.


Nested Class Summary
 class DummyLu0ManagedConnection.DummyLu0SessionEventHandler
           
 
Constructor Summary
DummyLu0ManagedConnection(DummyLu0ManagedConnectionFactory connectionFactory, DummyLu0SnaSessionConfigurationProperties configurationProperties)
          DummyLu0ManagedConnection 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(DummyLu0Connection 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(DummyLu0Connection connectionHandle)
          Closes current application level handle
 void destroy()
          Destroys the physical connection to the underlying resource manager
 boolean equals(java.lang.Object obj)
           
 DummyLu0SnaSessionConfigurationProperties 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
 DummyLu0ManagedConnectionFactory getConnectionFactory()
          Returns a LU0ManagedConnectionFactory instance associated with the DummyLu0ManagedConnection
 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 messageCancelled(DummyLu0SessionEvent event)
           
 void negativeResponse(DummyLu0SessionEvent event)
           
 void positiveResponse(DummyLu0SessionEvent event)
           
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          Removes an already registered connection event listener from the ManagedConnection instance
 void sessionClosed(DummyLu0SessionEvent event)
           
 void sessionDown(DummyLu0SessionEvent event)
           
 void sessionEstablished(DummyLu0SessionEvent event)
           
 void setConnectionFactory(DummyLu0ManagedConnectionFactory connectionFactory)
          Sets a LU0ManagedConnectionFactory instance associated with the DummyLu0ManagedConnection
 void setLogWriter(java.io.PrintWriter out)
          Sets LogWriter
 void setUserName(java.lang.String userName)
          Sets the userName
 void unsolicitedMessage(DummyLu0SessionEvent event)
           
 void unsolicitedMessageCancelled(DummyLu0SessionEvent event)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyLu0ManagedConnection

public DummyLu0ManagedConnection(DummyLu0ManagedConnectionFactory connectionFactory,
                                 DummyLu0SnaSessionConfigurationProperties configurationProperties)
                          throws javax.resource.ResourceException
DummyLu0ManagedConnection constructor

Parameters:
connectionFactory - javax.resource.spi.ManagedConnectionFactory
configurationProperties - com.ibm.btt.samples.business.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(DummyLu0Connection 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.btt.samples.business.sna.lu0.DummyLu0Connection
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(DummyLu0Connection connectionHandle)
              throws javax.resource.ResourceException
Closes current application level handle

Parameters:
connectionHandle - com.ibm.btt.samples.business.sna.lu0.DummyLu0Connection
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 DummyLu0ManagedConnectionFactory getConnectionFactory()
Returns a LU0ManagedConnectionFactory instance associated with the DummyLu0ManagedConnection

Returns:
com.ibm.btt.samples.business.sna.lu0.DummyLU0ManagedConnectionFactory

setConnectionFactory

public void setConnectionFactory(DummyLu0ManagedConnectionFactory connectionFactory)
Sets a LU0ManagedConnectionFactory instance associated with the DummyLu0ManagedConnection

Parameters:
connectionFactory - com.ibm.btt.samples.business.sna.lu0.DummyLU0ManagedConnectionFactory

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

Returns:
Returns a com.ibm.btt.samples.business.sna.lu0.host.DummyLu0SnaSessionConfigurationProperties

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

sessionEstablished

public void sessionEstablished(DummyLu0SessionEvent event)
                        throws DummyLu0Exception
Throws:
DummyLu0Exception

unsolicitedMessage

public void unsolicitedMessage(DummyLu0SessionEvent event)
                        throws DummyLu0Exception
Throws:
DummyLu0Exception

messageCancelled

public void messageCancelled(DummyLu0SessionEvent event)
                      throws DummyLu0Exception
Throws:
DummyLu0Exception

unsolicitedMessageCancelled

public void unsolicitedMessageCancelled(DummyLu0SessionEvent event)
                                 throws DummyLu0Exception
Throws:
DummyLu0Exception

sessionClosed

public void sessionClosed(DummyLu0SessionEvent event)
                   throws DummyLu0Exception
Throws:
DummyLu0Exception

sessionDown

public void sessionDown(DummyLu0SessionEvent event)
                 throws DummyLu0Exception
Throws:
DummyLu0Exception

positiveResponse

public void positiveResponse(DummyLu0SessionEvent event)
                      throws DummyLu0Exception
Throws:
DummyLu0Exception

negativeResponse

public void negativeResponse(DummyLu0SessionEvent event)
                      throws DummyLu0Exception
Throws:
DummyLu0Exception

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005