com.ibm.cics.core.connections
Interface IConnectionProvider

All Known Subinterfaces:
IWritableConnectionProvider
All Known Implementing Classes:
AbstractConnectionProvider

public interface IConnectionProvider

A service that provides a collection of ConnectionParameters, firing events when any changes are made to that collection, or to the ConnectionParameters in it.


Nested Class Summary
static class IConnectionProvider.ConnectionParametersAddedEvent
          Indicates that a new set of ConnectionParameters was added.
static class IConnectionProvider.ConnectionParametersRemovedEvent
          Indicates that an existing set of ConnectionParameters was removed.
static class IConnectionProvider.ConnectionParametersUpdatedEvent
          Indicates that an existing set of ConnectionParameters was updated.
static class IConnectionProvider.ConnectionProviderConnectionParametersEvent
          Abstract superclass for all ConnectionProviderEvents that pertain to changes to the provided collection of ConnectionParameters.
static class IConnectionProvider.ConnectionProviderEvent
          Abstract superclass for events on IConnectionProviders
static class IConnectionProvider.ConnectionProviderListener
          Listener class for IConnectionProviders.
static class IConnectionProvider.ConnectionProviderStaleEvent
          Indicates that this connection provider is stale, and should be refreshed.
static class IConnectionProvider.ConnectionProviderStatusChangedEvent
          Indicates that the status of this conneciton provider has changed with the latest refresh.
 
Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 void addListener(IConnectionProvider.ConnectionProviderListener listener)
          Adds a IConnectionProvider.ConnectionProviderListener to this service which is notified of any changes to the collection of ConnectionParameters provided by this IConnectionProvider
 ConnectionParameters getConnection(java.lang.String connectionId)
          Retrieves a set of ConnectionParameters identified by the supplied ID.
 java.util.Collection<ConnectionParameters> getConnections()
          Gets all ConnectionParameters provided by this IConnectionProvider or an empty collection if there are none.
 java.lang.String getDescription()
          Returns a description of this connection provider, to be used when representing it in the UI.
 java.lang.String getId()
           
 IStatus refresh(IProgressMonitor monitor)
          Called by the connections framework when this IConnectionProvider should check for any updates.
 

Field Detail

COPYRIGHT

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

getId

java.lang.String getId()
Returns:
the ID of this IConnectionProvider

getConnection

ConnectionParameters getConnection(java.lang.String connectionId)
Retrieves a set of ConnectionParameters identified by the supplied ID.

Parameters:
connectionId - the id to use.
Returns:
some ConnectionParameters or null if no such connection parameters exist.

getConnections

java.util.Collection<ConnectionParameters> getConnections()
Gets all ConnectionParameters provided by this IConnectionProvider or an empty collection if there are none.

Returns:
a Collection of ConnectionParameters or an empty collection.

addListener

void addListener(IConnectionProvider.ConnectionProviderListener listener)
Adds a IConnectionProvider.ConnectionProviderListener to this service which is notified of any changes to the collection of ConnectionParameters provided by this IConnectionProvider

Parameters:
listener - the IConnectionProvider.ConnectionProviderListener to add.

refresh

IStatus refresh(IProgressMonitor monitor)
Called by the connections framework when this IConnectionProvider should check for any updates. This is the appropriate time to perform any network or disk I/O necessary to check that the set of known ConnectionParameters is up to date. An IStatus object should be returned which describes the result of the refresh. This can be used to report any problems.

Parameters:
monitor - an IProgressMonitor to report progress to.
Returns:
an IStatus describing the result of the refresh.

getDescription

java.lang.String getDescription()
Returns a description of this connection provider, to be used when representing it in the UI.

Returns:
a description.


Copyright © 2013 IBM Corp. All Rights Reserved.