com.ibm.cics.core.comm
Interface IConnection

All Known Subinterfaces:
ICompositeConnection, IZOSConnection, IZOSJobConnection
All Known Implementing Classes:
AbstractConnection

public interface IConnection

Interface representing abstract lifecycleable connections


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void connect()
          Attempts to activate this connection.
 void disconnect()
          Deactivates this connection, cleaning up any associated temporary state.
 ConnectionConfiguration getConfiguration()
          Returns the ConnectionConfiguration in use by this connection.
 java.lang.String getHost()
          Deprecated. use getConfiguration() instead
 java.lang.String getName()
          Deprecated. use getConfiguration() instead
 int getPort()
          Deprecated. use getConfiguration() instead
 java.lang.String getUserID()
          Deprecated. use getConfiguration() instead
 boolean isConnected()
          Determines whether or not this IConnection is currently active.
 boolean isSecure()
          Deprecated. use getConfiguration() instead.
 void setConfiguration(ConnectionConfiguration connectionConfiguration)
          Sets the ConnectionConfiguration to be used by this connection.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

setConfiguration

void setConfiguration(ConnectionConfiguration connectionConfiguration)
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.

Parameters:
connectionConfiguration - the connection configuration to use when connecting.

getConfiguration

ConnectionConfiguration getConfiguration()
Returns the ConnectionConfiguration in use by this connection.

Returns:
a ConnectionConfiguration or null if none is set.

connect

void connect()
             throws ConnectionException
Attempts to activate this connection.

Throws:
AuthenticationException - if there was a problem with the supplied means of authentication
ConnectionCancelledException - if the connection requested that this connection attempt be cancelled
ConnectionException - if a problem occurred whilst attempting to connect

disconnect

void disconnect()
                throws ConnectionException
Deactivates this connection, cleaning up any associated temporary state.

Throws:
ConnectionException - if a problem occurred whilst attempting to disconnect.

getName

@Deprecated
java.lang.String getName()
Deprecated. use getConfiguration() instead

Returns:
the name of this ConnectionConfiguration associated with this connection, or null if none.

getHost

@Deprecated
java.lang.String getHost()
Deprecated. use getConfiguration() instead

Returns:
the host of the ConnectionConfiguration associated with this connection, or null if none.

getPort

int getPort()
Deprecated. use getConfiguration() instead

Returns:
the port of the ConnectionConfiguration associated with this connection, or 0 if none.

getUserID

java.lang.String getUserID()
Deprecated. use getConfiguration() instead

Returns:
the user ID of the ConnectionConfiguration associated with this connection, or null if none.

isConnected

boolean isConnected()
Determines whether or not this IConnection is currently active.

Returns:
true if this connection is currently active, or false if not.

isSecure

@Deprecated
boolean isSecure()
Deprecated. use getConfiguration() instead.

Returns:
true if this connection is using ssl, or false if not.


Copyright © 2013 IBM Corp. All Rights Reserved.