commonj.connector.metadata.discovery.connection
Interface OutboundConnectionType

All Superinterfaces:
ConnectionType

public interface OutboundConnectionType
extends ConnectionType

Describes a specific type of the outbound connection within the metadata discovery service. A connection type defines the properties needed to obtain a connection of this type as well as other key information about the connection type.

All resource adapters supporting outbound connections must implement this interface.

Since:
1.0

Nested Class Summary
static interface OutboundConnectionType.OutboundConnectionBeans
          Represents the JavaBean instances needed to support the outbound communication to an adapter, a runtime representation of the outbound connection configuration.
 
Method Summary
 OutboundConnectionType.OutboundConnectionBeans createOutboundConnectionBeans()
          Creates a new OutboundConnectionBeans instance which has new default instances of the ResourceAdapter and ManagedConnectionFactory Java Beans for this OutboundConnectionType.
 OutboundConnectionConfiguration createOutboundConnectionConfiguration()
          Creates a new ConnectionConfiguration instance.
 boolean isSupportedAtRuntime()
          Indicates if this type of connection is valid for use at runtime to execute functions on a service.
 boolean isSupportedInMetadataService()
          Indicates if this type of connection is valid for use in creating a MetadataConnection.
 MetadataConnection openMetadataConnection(OutboundConnectionConfiguration connectionConfiguration)
          Establish a connection for the connection type with the given Connection Configuration.
 void synchronizeFromManagedConnectionFactoryToPropertyGroup(ManagedConnectionFactory bean, PropertyGroup pg)
          Synchronizes from the ManagedConnectionFactory to the PropertyGroup.
 void synchronizeFromOutboundBeansToUnifiedPropertyGroup(OutboundConnectionType.OutboundConnectionBeans outboundConnectionBeans, PropertyGroup pg)
          Synchronizes from the outbound connection beans to the unified outbound connection PropertyGroup.
 void synchronizeFromPropertyGroupToManagedConnectionFactory(PropertyGroup pg, ManagedConnectionFactory bean)
          Synchronizes from the PropertyGroup to the ManagedConnectionFactory.
 void synchronizeFromUnifiedPropertyGroupToBeans(PropertyGroup pg, OutboundConnectionType.OutboundConnectionBeans outboundConnectionBeans)
          Synchronizes from the unified outbound connection PropertyGroup to the provided outbound connection beans.
 
Methods inherited from interface commonj.connector.metadata.discovery.connection.ConnectionType
getAdapterType, getConnectionPersistence, getDescription, getDisplayName, getId, isConnectionConfigurationComplete, synchronizeFromPropertyGroupToResourceAdapter, synchronizeFromResourceAdapterToPropertyGroup
 

Method Detail

createOutboundConnectionConfiguration

OutboundConnectionConfiguration createOutboundConnectionConfiguration()
Creates a new ConnectionConfiguration instance. Properties needed to configure connections of this type are provided in the returned ConnectionConfiguration instance. Tools should set the values for these properties directly into the returned instance.

The populated ConnectionConfiguration may be used later in a call to openMetadataConnection() or persisted for reuse by using the ConnectionPersistence interface.

Returns:
OutboundConnectionConfiguration A configuration with properties necessay to configure connectin of this type. The return value must not be null.
See Also:
ConnectionType.getConnectionPersistence(), MetadataEdit

openMetadataConnection

MetadataConnection openMetadataConnection(OutboundConnectionConfiguration connectionConfiguration)
                                          throws MetadataException
Establish a connection for the connection type with the given Connection Configuration. The returned MetadataConnection instance is to be used only when communicating with the Metadata Discovery Service. It is not a valid runtime connection.

Parameters:
connectionConfiguration - The configuration information needed to establish the connection. The argument must not be null.
Returns:
A MetadataConnection object suitable for connecting to the EIS to browse and discover EIS services. The implementation must not return null.
Throws:
MetadataException - if an error occured during execution

isSupportedAtRuntime

boolean isSupportedAtRuntime()
Indicates if this type of connection is valid for use at runtime to execute functions on a service. It is possible that some connection types may only be valid for runtime and some may only be valid for metadata discovery use.

Returns:
true if the connection can be used at runtime and false otherwise.

isSupportedInMetadataService

boolean isSupportedInMetadataService()
Indicates if this type of connection is valid for use in creating a MetadataConnection. It is possible that some connection types may only be valid for runtime and some may only be valid for metadata discovery use.

Returns:
true if this connection type can be used for the metadata discovery service, false otherwise

synchronizeFromOutboundBeansToUnifiedPropertyGroup

void synchronizeFromOutboundBeansToUnifiedPropertyGroup(OutboundConnectionType.OutboundConnectionBeans outboundConnectionBeans,
                                                        PropertyGroup pg)
                                                        throws MetadataException
Synchronizes from the outbound connection beans to the unified outbound connection PropertyGroup.

Parameters:
outboundConnectionBeans - The outbound connection beans.
pg - PropertyGroup populated from the bean, which provides rich editing for a unified view of the outbound connection.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup

synchronizeFromUnifiedPropertyGroupToBeans

void synchronizeFromUnifiedPropertyGroupToBeans(PropertyGroup pg,
                                                OutboundConnectionType.OutboundConnectionBeans outboundConnectionBeans)
                                                throws MetadataException
Synchronizes from the unified outbound connection PropertyGroup to the provided outbound connection beans.

Parameters:
pg - The unified outbound connection PropertyGroup which has user interface updates.
outboundConnectionBeans - The targeted outbound connection beans which will be updated from values in the PropertyGroup.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup

synchronizeFromManagedConnectionFactoryToPropertyGroup

void synchronizeFromManagedConnectionFactoryToPropertyGroup(ManagedConnectionFactory bean,
                                                            PropertyGroup pg)
                                                            throws MetadataException
Synchronizes from the ManagedConnectionFactory to the PropertyGroup.

Parameters:
bean - The source ManagedConnectionFactory.
pg - The target PropertyGroup.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup

synchronizeFromPropertyGroupToManagedConnectionFactory

void synchronizeFromPropertyGroupToManagedConnectionFactory(PropertyGroup pg,
                                                            ManagedConnectionFactory bean)
                                                            throws MetadataException
Synchronizes from the PropertyGroup to the ManagedConnectionFactory.

Parameters:
pg - The source PropertyGroup which has user interface updates.
bean - The target ManagedConnectionFactory.
Throws:
MetadataException - if any error occured.
See Also:
PropertyGroup

createOutboundConnectionBeans

OutboundConnectionType.OutboundConnectionBeans createOutboundConnectionBeans()
Creates a new OutboundConnectionBeans instance which has new default instances of the ResourceAdapter and ManagedConnectionFactory Java Beans for this OutboundConnectionType. If the resource adapter does not have a ResourceAdapter Java Bean, it must return null for the getResourceAdapterJavaBean() method.

Returns:
OutboundConnectionBeans The runtime representation of the outbound connection. The return value must not be null.