org.apache.qpid.management.wsdm.muse.resources
Class QManWsResource

java.lang.Object
  extended by org.apache.qpid.management.wsdm.muse.resources.QManWsResource
All Implemented Interfaces:
org.apache.muse.core.Initialization, org.apache.muse.core.InitializationParameters, org.apache.muse.core.Resource, org.apache.muse.core.Shutdown, org.apache.muse.ws.resource.WsResource

public class QManWsResource
extends Object
implements org.apache.muse.ws.resource.WsResource

QMan WS resource. We could say that this is a QMan manageable entity under the WS-DM perspective.


Nested Class Summary
(package private) static interface QManWsResource.State
          Internal state of this resource.
 
Constructor Summary
QManWsResource()
           
 
Method Summary
 void addCapability(org.apache.muse.core.Capability capability)
          Adds the given capability to this resource.
 org.apache.muse.core.Capability getCapability(String capabilityURI)
          Returns the capability associated with the given URI.
 Collection getCapabilityURIs()
          Returns a collection with all registered capability URIs.
 String getContextPath()
          Returns the context path of this resource.
 org.apache.muse.ws.addressing.EndpointReference getEndpointReference()
          Returns the endpoint reference of this resource.
 org.apache.muse.core.Environment getEnvironment()
          Returns the enviroment associated with this resource.
 String getInitializationParameter(String name)
          Returns the initialization parameter of this resource associated with the given name.
 Map<String,String> getInitializationParameters()
          Returns the map containing all init parameters of this resource.
 Logger getLog()
          N.A.
 org.apache.muse.ws.resource.properties.ResourcePropertyCollection getPropertyCollection()
          Returns the collection containing all properties of this resource.
 org.apache.muse.core.ResourceManager getResourceManager()
          Returns the resource manager associated with this resource.
 Document getWsdl()
          Return the WSDL document of this resource.
 String getWsdlPath()
          Returns the wsdl (relative) path of this resource.
 QName getWsdlPortType()
          Returns the port type of this resource.
 boolean hasBeenInitialized()
          Returns true if this resource has been initialized, false otherwise.
 boolean hasBeenShutdown()
          Returns true if this resource has been shutdown, false otherwise.
 boolean hasCapability(String capabilityURI)
          Checks if a capability with the given URI is available for this resource.
 void initialize()
          Initializes this resources.
 Element invoke(Element requestBody)
          Invokes the action specified in the given soap request on this resource.
 void setContextPath(String contextPath)
          Sets the context path of this resource.
 void setEndpointReference(org.apache.muse.ws.addressing.EndpointReference endpointReference)
          Sets the endpoint reference of this resource.
 void setEnvironment(org.apache.muse.core.Environment environment)
          Sets the context environment of this resource.
 void setInitializationParameters(Map parameters)
          Sets the initialization parameters of this resource.
 void setLog(Logger log)
          N.A.
 void setResourceManager(org.apache.muse.core.ResourceManager manager)
          Sets the resource manager owner of this resource.
 void setWsdlPath(String wsdlPath)
          Sets the WSDL (relative) path of this resource.
 void setWsdlPortType(QName wsdlPortType)
          Sets the port type of this resource.
 void shutdown()
          Shutdown procedure for this resource.
 String toString()
          Returns a string representation of this resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QManWsResource

public QManWsResource()
Method Detail

addCapability

public void addCapability(org.apache.muse.core.Capability capability)
Adds the given capability to this resource.

Parameters:
capability - the capability to be added.

getCapability

public org.apache.muse.core.Capability getCapability(String capabilityURI)
Returns the capability associated with the given URI.

Returns:
the capability associated with the given URI.

getCapabilityURIs

public final Collection getCapabilityURIs()
Returns a collection with all registered capability URIs.

Returns:
a collection with all registered capability URIs.

getContextPath

public final String getContextPath()
Returns the context path of this resource.

Specified by:
getContextPath in interface org.apache.muse.core.Resource
Returns:
the context path of this resource.

getEndpointReference

public org.apache.muse.ws.addressing.EndpointReference getEndpointReference()
Returns the endpoint reference of this resource.

Specified by:
getEndpointReference in interface org.apache.muse.core.Resource
Returns:
the endpoint reference of this resource.

getEnvironment

public final org.apache.muse.core.Environment getEnvironment()
Returns the enviroment associated with this resource.

Specified by:
getEnvironment in interface org.apache.muse.core.Resource
Returns:
the enviroment associated with this resource.

getInitializationParameter

public final String getInitializationParameter(String name)
Returns the initialization parameter of this resource associated with the given name.

Specified by:
getInitializationParameter in interface org.apache.muse.core.InitializationParameters
Parameters:
name - the init parameter name.
Returns:
the initialization parameter associated with the given name.

getInitializationParameters

public final Map<String,String> getInitializationParameters()
Returns the map containing all init parameters of this resource.

Specified by:
getInitializationParameters in interface org.apache.muse.core.InitializationParameters
Returns:
the map containing all init parameters of this resource.

getLog

public final Logger getLog()
N.A. This resource uses QMan logging instead of plain java.util.logger implementation.

Specified by:
getLog in interface org.apache.muse.core.Resource

getResourceManager

public org.apache.muse.core.ResourceManager getResourceManager()
Returns the resource manager associated with this resource.

Specified by:
getResourceManager in interface org.apache.muse.core.Resource
Returns:
the resource manager associated with this resource.

getWsdlPath

public String getWsdlPath()
Returns the wsdl (relative) path of this resource.

Specified by:
getWsdlPath in interface org.apache.muse.core.Resource
Returns:
the wsdl (relative) path of this resource.

getWsdlPortType

public final QName getWsdlPortType()
Returns the port type of this resource.

Specified by:
getWsdlPortType in interface org.apache.muse.core.Resource
Returns:
the port type of this resource.

hasBeenInitialized

public final boolean hasBeenInitialized()
Returns true if this resource has been initialized, false otherwise.

Specified by:
hasBeenInitialized in interface org.apache.muse.core.Initialization
Returns:
true if this resource has been initialized, false otherwise.

hasBeenShutdown

public final boolean hasBeenShutdown()
Returns true if this resource has been shutdown, false otherwise.

Specified by:
hasBeenShutdown in interface org.apache.muse.core.Shutdown
Returns:
true if this resource has been shutdown, false otherwise.

hasCapability

public final boolean hasCapability(String capabilityURI)
Checks if a capability with the given URI is available for this resource.

Returns:
true if a capability with the given URI is available for this resource, false otherwise.

getPropertyCollection

public final org.apache.muse.ws.resource.properties.ResourcePropertyCollection getPropertyCollection()
Returns the collection containing all properties of this resource.

Specified by:
getPropertyCollection in interface org.apache.muse.ws.resource.WsResource
Returns:
the collection containing all properties of this resource.

getWsdl

public Document getWsdl()
Return the WSDL document of this resource.

Returns:
the WSDL document of this resource.

initialize

public void initialize()
                throws org.apache.muse.ws.addressing.soap.SoapFault
Initializes this resources. Note that the what needs to be done depends on the current state of this resource.

Specified by:
initialize in interface org.apache.muse.core.Initialization
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - when the initialization fails.

invoke

public Element invoke(Element requestBody)
Invokes the action specified in the given soap request on this resource.

Specified by:
invoke in interface org.apache.muse.core.Resource
Parameters:
requestBody - the SOAP body.
Returns:
the result of the invocation as org.w3c.dom.Element

setContextPath

public final void setContextPath(String contextPath)
Sets the context path of this resource.

Specified by:
setContextPath in interface org.apache.muse.core.Resource
Parameters:
contextPath - the context path of this resource.

setEndpointReference

public final void setEndpointReference(org.apache.muse.ws.addressing.EndpointReference endpointReference)
Sets the endpoint reference of this resource.

Specified by:
setEndpointReference in interface org.apache.muse.core.Resource
Parameters:
endpointReference - the endpoint reference of this resource.

setEnvironment

public final void setEnvironment(org.apache.muse.core.Environment environment)
Sets the context environment of this resource.

Specified by:
setEnvironment in interface org.apache.muse.core.Resource
Parameters:
environment - the context environment of this resource.

setInitializationParameters

public final void setInitializationParameters(Map parameters)
Sets the initialization parameters of this resource.

Specified by:
setInitializationParameters in interface org.apache.muse.core.InitializationParameters
Parameters:
parameters - the init parameters of this resource.

setLog

public final void setLog(Logger log)
N.A. for this resource. QMan logging mechanism is used for that.

Specified by:
setLog in interface org.apache.muse.core.Resource

setResourceManager

public void setResourceManager(org.apache.muse.core.ResourceManager manager)
Sets the resource manager owner of this resource.

Specified by:
setResourceManager in interface org.apache.muse.core.Resource
Parameters:
manager - the resource manager of this resource.

setWsdlPath

public final void setWsdlPath(String wsdlPath)
Sets the WSDL (relative) path of this resource.

Specified by:
setWsdlPath in interface org.apache.muse.core.Resource
Parameters:
wsdlPath - the WSDL (relative) path of this resource.

setWsdlPortType

public final void setWsdlPortType(QName wsdlPortType)
Sets the port type of this resource.

Specified by:
setWsdlPortType in interface org.apache.muse.core.Resource
Parameters:
wsdlPortType - the port type of this resource.

shutdown

public void shutdown()
              throws org.apache.muse.ws.addressing.soap.SoapFault
Shutdown procedure for this resource.

Specified by:
shutdown in interface org.apache.muse.core.Shutdown
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - when the shutdown procedure fails.

toString

public String toString()
Returns a string representation of this resource. Basically the resource endpoint reference (as a string) is returned.

Overrides:
toString in class Object
Returns:
the resource endpoint reference (as a string) is returned.


Licensed to the Apache Software Foundation