com.sun.xml.ws.metro.api.config.management
Class ManagementFactory

java.lang.Object
  extended by com.sun.xml.ws.metro.api.config.management.ManagementFactory

public class ManagementFactory
extends Object

Provides methods to create implementations for the Management APIs.

Author:
Fabian Ritzmann

Constructor Summary
ManagementFactory(com.sun.xml.ws.api.config.management.policy.ManagedServiceAssertion assertion)
          Creates a factory instance initialized with the given ManagedServiceAssertion.
 
Method Summary
<T> Collection<CommunicationServer<T>>
createCommunicationImpls(ManagedEndpoint<T> endpoint, com.sun.xml.ws.api.config.management.EndpointCreationAttributes creationAttributes, ClassLoader classLoader, Configurator<T> configurator, EndpointStarter starter)
          Finds and returns all CommunicationServer implementations.
<T> ConfigReader<T>
createConfigReaderImpl(ManagedEndpoint<T> endpoint, com.sun.xml.ws.api.config.management.EndpointCreationAttributes attributes, ClassLoader classLoader, EndpointStarter starter)
          Finds and returns a ConfigReader implementation.
<T> ConfigSaver<T>
createConfigSaverImpl(ManagedEndpoint<T> endpoint)
          Finds and returns a ConfigSaver implementation.
<T> Configurator<T>
createConfiguratorImpl(ManagedEndpoint<T> endpoint, ConfigReader<T> reader, ConfigSaver<T> saver)
          Finds and returns a Configurator implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagementFactory

public ManagementFactory(com.sun.xml.ws.api.config.management.policy.ManagedServiceAssertion assertion)
Creates a factory instance initialized with the given ManagedServiceAssertion.

Parameters:
assertion - A ManagedServiceAssertion. May not be null.
Method Detail

createCommunicationImpls

public <T> Collection<CommunicationServer<T>> createCommunicationImpls(ManagedEndpoint<T> endpoint,
                                                                       com.sun.xml.ws.api.config.management.EndpointCreationAttributes creationAttributes,
                                                                       ClassLoader classLoader,
                                                                       Configurator<T> configurator,
                                                                       EndpointStarter starter)
                                                            throws WebServiceException
Finds and returns all CommunicationServer implementations. By default it returns a JMX based implementation for the CommunicationServer.

Type Parameters:
T - The type of the endpoint implementation.
Parameters:
endpoint - The ManagedEndpoint instance. May not be null.
creationAttributes - The attributes with which the original endpoint was created. May not be null.
classLoader - The class loader that is associated with the original endpoint. Must not be null.
configurator - A Configurator instance. May not be null.
starter - An Endpoint starter instance. May not be null.
Returns:
The initialized CommunicationServer implementations.
Throws:
WebServiceException - If a CommunicationServer implementation could not be instantiated or initialized or if no CommunicationServer implementation was found.

createConfiguratorImpl

public <T> Configurator<T> createConfiguratorImpl(ManagedEndpoint<T> endpoint,
                                                  ConfigReader<T> reader,
                                                  ConfigSaver<T> saver)
                                       throws WebServiceException
Finds and returns a Configurator implementation. The default Configurator implementation passes the request into a ConfigSaver.

Type Parameters:
T - The endpoint implementation class type.
Parameters:
endpoint - The managed endpoint instance. Must not be null.
reader - A ConfigReader instance. Must not be null.
saver - A ConfigSaver instance. Must not be null.
Returns:
A Configurator implementation
Throws:
WebServiceException - If a Configurator implementation could not be instantiated or if no implementation was found.

createConfigSaverImpl

public <T> ConfigSaver<T> createConfigSaverImpl(ManagedEndpoint<T> endpoint)
                                     throws WebServiceException
Finds and returns a ConfigSaver implementation. The default ConfigSaver implementation writes the configuration data to a database with JDBC.

Type Parameters:
T - The endpoint implementation class type.
Parameters:
endpoint - The endpoint implementation class type.
Returns:
A ConfigSaver implementation
Throws:
WebServiceException - If a ConfigSaver implementation could not be instantiated or if no implementation was found.

createConfigReaderImpl

public <T> ConfigReader<T> createConfigReaderImpl(ManagedEndpoint<T> endpoint,
                                                  com.sun.xml.ws.api.config.management.EndpointCreationAttributes attributes,
                                                  ClassLoader classLoader,
                                                  EndpointStarter starter)
                                       throws WebServiceException
Finds and returns a ConfigReader implementation. By default it returns an implementation that polls a database with JDBC for changes to the configuration data.

Type Parameters:
T - The endpoint implementation class type.
Parameters:
endpoint - A ManagedEndpoint instance. Must not be null.
attributes - The attributes with which the original WSEndpoint instance was created.
classLoader - The class loader that is associated with the original WSEndpoint instance.
starter - An EndpointStarter instance. Must not be null.
Returns:
The initialized ConfigReader implementation.
Throws:
WebServiceException - If a ConfigReader implementation could not be instantiated or initialized or if no ConfigReader implementation was found.


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.