com.ibm.cics.core.comm
Interface IConnectable

All Known Subinterfaces:
IConnectable2, IParentConnectable, IZOS
All Known Implementing Classes:
AbstractConnectable

public interface IConnectable

A service associated with a specific IConnectionCategory that wraps IConnections of a common subtype. IConnectables provide a richer interface to connections, and a service-based approach to defining their capabilities. This allows clients to enquire for what capabilities are available to exploit, rather than requiring connections of specific subtypes be available. Subclasses of IConnectable will enrich this interface with methods specific to their domain, providing these services to clients.


Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void addListener(IConnectableListener connectableListener)
          Deprecated. - replaced by IConnectable2.addListener(IConnectableListener2)
 void disconnect()
          Disconnects the underlying IConnection that is being used to provide this service.
 IConnection getConnection()
          Retrieves the IConnection being used by this IConnectable.
 java.lang.Class<? extends IConnection> getConnectionType()
           
 boolean isConnected()
          Determines whether or not the services provided by this IConnectable are currently available.
 void setConnection(IConnection connection)
          Sets the underlying IConnection to be used by this IConnectable.
 

Field Detail

COPYRIGHT

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

setConnection

void setConnection(IConnection connection)
Sets the underlying IConnection to be used by this IConnectable. The connection should be supplied in a connected state.

Parameters:
the - connection to use when making requests.

getConnection

IConnection getConnection()
Retrieves the IConnection being used by this IConnectable.

Returns:
an IConnectable or null

isConnected

boolean isConnected()
Determines whether or not the services provided by this IConnectable are currently available.

Returns:
true if services are available, or false if not.

getConnectionType

java.lang.Class<? extends IConnection> getConnectionType()
Returns:
the common interface describing all possible IConnection subclasses for this IConnectable.

disconnect

void disconnect()
                throws ConnectionException
Disconnects the underlying IConnection that is being used to provide this service.

Throws:
ConnectionException - if there is a problem when disconnecting.

addListener

@Deprecated
void addListener(IConnectableListener connectableListener)
Deprecated. - replaced by IConnectable2.addListener(IConnectableListener2)



Copyright © 2013 IBM Corp. All Rights Reserved.