org.apache.qpid.management.wsdm.capabilities
Class WsArtifactsFactory

java.lang.Object
  extended by org.apache.qpid.management.wsdm.capabilities.WsArtifactsFactory

 class WsArtifactsFactory
extends Object

Manager for all WS-* related artifacts. Basically it is a factory ehnanced with a _cache mechanism so each created resource (WSDL, capability class, descriptor) is created and its reference is returned when requested again.


Constructor Summary
WsArtifactsFactory(org.apache.muse.core.Environment environment, MBeanServer mxServer)
          Builds a new factory with the given environment and mbean server.
 
Method Summary
(package private)  MBeanCapability createCapability(Class<MBeanCapability> capabilityClass, ObjectName objectName)
          Utility method for create concrete instance of the given capability class.
(package private)  WsArtifacts getArtifactsFor(org.apache.muse.core.Resource resource, ObjectName objectName)
          Returns the WS artifacts corresponding with the given resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsArtifactsFactory

public WsArtifactsFactory(org.apache.muse.core.Environment environment,
                          MBeanServer mxServer)
Builds a new factory with the given environment and mbean server.

Parameters:
environment - the builder environment.
mxServer - the management server.
Method Detail

getArtifactsFor

WsArtifacts getArtifactsFor(org.apache.muse.core.Resource resource,
                            ObjectName objectName)
                      throws ArtifactsNotAvailableException
Returns the WS artifacts corresponding with the given resource.

Parameters:
resource - the WS resource.
objectName - the resource identifier (name).
Returns:
the WS artifacts corresponding with the given resource.
Throws:
ArtifactsNotAvailableException - when some problem occurs during artifacts generation.

createCapability

MBeanCapability createCapability(Class<MBeanCapability> capabilityClass,
                                 ObjectName objectName)
                           throws InstantiationException,
                                  IllegalAccessException
Utility method for create concrete instance of the given capability class.

Parameters:
capabilityClass - the capability class.
objectName - the object name that will act as the target for this capability invocations.
Returns:
an initialized instance of the given capability class.
Throws:
InstantiationException - when the class cannot be instantiated.
IllegalAccessException - when this method does not have access to the definition of the capability class.


Licensed to the Apache Software Foundation