Class CICSManagedConnectionFactory

java.lang.Object
com.ibm.jakarta.connector2.cics.CICSManagedConnectionFactory
All Implemented Interfaces:
CICSLogTraceLevels, jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ResourceAdapterAssociation, jakarta.resource.spi.ValidatingManagedConnectionFactory, Serializable
Direct Known Subclasses:
ECIManagedConnectionFactory, EPIManagedConnectionFactory

public abstract class CICSManagedConnectionFactory extends Object implements jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ValidatingManagedConnectionFactory, CICSLogTraceLevels, jakarta.resource.spi.ResourceAdapterAssociation
Abstract class that provides the managed connection factory framework for CICS resource adapters.
  • Field Details

  • Constructor Details

    • CICSManagedConnectionFactory

      public CICSManagedConnectionFactory()
      Default constructor. All properties must be set using the appropriate setters.
  • Method Details

    • getConnectionURL

      public String getConnectionURL()
      Get the CICS TG gateway URL.
      Returns:
      Gateway URL.
    • getServerName

      public String getServerName()
      Return the server to connect to (must be defined to the CICS TG).
      Returns:
      The server name.
    • getUserName

      public String getUserName()
      Get the username for this connection.
      Returns:
      The username.
    • getRequestExits

      public String getRequestExits()
      Get the requestExits for this connection.
      Returns:
      The requestExits.
    • getApplid

      public String getApplid()
      Get the applid for this connection.
      Returns:
      The Applid.
    • getApplidQualifier

      public String getApplidQualifier()
      Get the applid qualifier for this connection.
      Returns:
      The Applid Qualifier.
    • getPassword

      public String getPassword()
      Get the password or password phrase for this connection.
      Returns:
      The password or password phrase.
    • getPortNumber

      public String getPortNumber()
      Get the port to communicate with the CICS TG on.
      Returns:
      The port number.
    • getSocketConnectTimeout

      public String getSocketConnectTimeout()
      Returns the socket connect timeout value for a connection to CICS TG. The timeout represents the maximum amount of time (in milliseconds) a connection will attempt to open a socket connection successfully to a remote Gateway daemon. The timeout is ignored for attempted connections to a local Gateway instance.
      Returns:
      String socketConnectTimeout The timeout value (in milliseconds). A value of 0 represents no timeout.
    • getClientSecurity

      public String getClientSecurity()
      Get the client security class name.
      Returns:
      The client security class name.
    • getServerSecurity

      public String getServerSecurity()
      Get the server security class name.
      Returns:
      The server security class name.
    • getKeyRingClass

      public String getKeyRingClass()
      Get the key ring class name to use for an SSL connection.
      Returns:
      The key ring name.
    • getTrackingToken

      public String getTrackingToken()
      Get the mandate for Tracking Token.
      Returns:
      mandate for Tracking Token.
    • getKeyRingPassword

      public String getKeyRingPassword()
      Get the key ring password to use for an SSL connection.
      Returns:
      The key ring password.
    • getCipherSuites

      public String getCipherSuites()
      Return the comma delimited list of cipher suites a SSL connection is able to use.
      Returns:
      The list of cipher suites.
    • getInvalidConnections

      public Set getInvalidConnections(Set connectionSet) throws jakarta.resource.ResourceException
      Returns a Set of invalid connections (those that have been identified as dirty) from the entire set of CICS managed connections that currently exist
      Specified by:
      getInvalidConnections in interface jakarta.resource.spi.ValidatingManagedConnectionFactory
      Parameters:
      connectionSet - The set of all CICS managed connections
      Returns:
      The set of all CICS managed connection that have determined to be invalid
      Throws:
      jakarta.resource.ResourceException
    • getLogWriter

      public PrintWriter getLogWriter()
      Return the current log writer for this instance.
      Specified by:
      getLogWriter in interface jakarta.resource.spi.ManagedConnectionFactory
      Returns:
      The log writer.
    • setLogWriter

      public void setLogWriter(PrintWriter newLog)
      Set the log writer to be used by this object. Setting this to null will switch off logging. Setting it to a PrintWriter object will turn logging on.
      Specified by:
      setLogWriter in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      newLog - The PrintWriter object to use.
    • getTraceLevel

      public Integer getTraceLevel()
      Get the trace level for this managed connection factory.
      Returns:
      trace level.
      See Also:
    • getInterceptPlugin

      public String getInterceptPlugin()
      Gets the name of the GatewayIntercept plug-in class for this managed connection factory.
      Returns:
      the name of the Gateway intercept plug-in class
    • getLogHelper

      public CICSLogHelper getLogHelper()
      Get the log helper object. As the log helper is transient, we must use this method. It will create a log helper object at the first use.
    • hashCode

      public int hashCode()
      Returns a hashcode based on connectionURL, serverName and portNumber which uniquely identifies the backend server.
      Specified by:
      hashCode in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode.
    • equals

      public boolean equals(Object inObj)
      Returns a flag indicating whether the objects are identical or not. Objects are identical if they have the same reference or the connection properties match. This version tests everything except userid and password. Note that equals here assumes null and "" are NOT the same, although they will have the same behaviour in the framework.
      Specified by:
      equals in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      equals in class Object
      Returns:
      true if the objects are equal, false otherwise.
    • toString

      public String toString()
      Return a string representation of this object. It is made up of the super.toString() and the properties held in this object.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this instance.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener pcl)
      Adds a PropertyChangeListener.
      Parameters:
      pcl - java.beans.PropertyChangeListener.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener pcl)
      Removes a PropertyChangeListener.
      Parameters:
      pcl - java.beans.PropertyChangeListener.
    • firePropertyChange

      public void firePropertyChange(String strPropertyName, Object oOld, Object oNew)
      Fires a PropertyChangeEvent to any listeners.
      Parameters:
      strPropertyName - java.lang.String.
      oOld - java.lang.Object.
      oNew - java.lang.Object.
    • getResourceAdapter

      public jakarta.resource.spi.ResourceAdapter getResourceAdapter()
      Specified by:
      getResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
    • setResourceAdapter

      public void setResourceAdapter(jakarta.resource.spi.ResourceAdapter cicsRA) throws jakarta.resource.ResourceException
      Specified by:
      setResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
      Throws:
      jakarta.resource.ResourceException