com.ibm.cics.core.comm
Class AbstractConnection

java.lang.Object
  extended by com.ibm.cics.core.comm.AbstractConnection
All Implemented Interfaces:
IConnection

public abstract class AbstractConnection
extends java.lang.Object
implements IConnection

Abstract implementation of IConnection


Constructor Summary
AbstractConnection()
           
 
Method Summary
 ConnectionConfiguration getConfiguration()
          Get the configuration associated with this connections.
 java.lang.String getHost()
          Deprecated. 
 java.lang.String getName()
           
protected  java.lang.String getPassword()
          Deprecated. Clients should call getConfiguration() and retrieve the password from there, as not all connections require a password.
 int getPort()
          Deprecated. 
 java.lang.String getUserID()
          Deprecated. 
protected  boolean hasNullConfiguration()
          Indicates whether or not this connection has had a ConnectionConfiguration set yet.
 boolean isSecure()
          Deprecated. 
 void setConfiguration(ConnectionConfiguration connectionConfiguration)
          Sets the ConnectionConfiguration to be used by this connection.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.cics.core.comm.IConnection
connect, disconnect, isConnected
 

Constructor Detail

AbstractConnection

public AbstractConnection()
Method Detail

setConfiguration

public void setConfiguration(ConnectionConfiguration connectionConfiguration)
Description copied from interface: IConnection
Sets the ConnectionConfiguration to be used by this connection. This should be set before attempting to connect. Any connections that are established subsequently will use this configuration.

Specified by:
setConfiguration in interface IConnection
Parameters:
connectionConfiguration - the connection configuration to use when connecting.

getConfiguration

public ConnectionConfiguration getConfiguration()
Get the configuration associated with this connections. Returns a copy for defensive purposes, so modifications to the configuration will not be reflected by the connection unless the modified connection is set using setConfiguration(ConnectionConfiguration).

Specified by:
getConfiguration in interface IConnection
Returns:
The ConnectionConfiguration associated with this connection, or a null object if none has been set.

getName

public java.lang.String getName()
Specified by:
getName in interface IConnection
Returns:
the name of this ConnectionConfiguration associated with this connection, or null if none.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isSecure

@Deprecated
public boolean isSecure()
Deprecated. 

Specified by:
isSecure in interface IConnection
Returns:
true if this connection is using ssl, or false if not.

getHost

@Deprecated
public java.lang.String getHost()
Deprecated. 

Specified by:
getHost in interface IConnection
Returns:
the host of the ConnectionConfiguration associated with this connection, or null if none.

getPort

@Deprecated
public int getPort()
Deprecated. 

Specified by:
getPort in interface IConnection
Returns:
the port of the ConnectionConfiguration associated with this connection, or 0 if none.

getUserID

@Deprecated
public java.lang.String getUserID()
Deprecated. 

Specified by:
getUserID in interface IConnection
Returns:
the user ID of the ConnectionConfiguration associated with this connection, or null if none.

getPassword

@Deprecated
protected java.lang.String getPassword()
Deprecated. Clients should call getConfiguration() and retrieve the password from there, as not all connections require a password.

Returns:
the password of the ConnectionConfiguration associated with this connection, or null if no configuration has been set.

hasNullConfiguration

protected boolean hasNullConfiguration()
Indicates whether or not this connection has had a ConnectionConfiguration set yet.

Returns:
true if a configuration has been set, false if not.


Copyright © 2013 IBM Corp. All Rights Reserved.