Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.core
Interface Capability

All Superinterfaces:
  Initialization, InitializationParameters, Shutdown

All Known Subinterfaces:
  Advertisement, Configuration, CorrelatableProperties, Description, Entry, GetCapability, Identity, ImmediateTermination, ManageabilityCapability, ManageabilityCharacteristics, MetadataExchange, Metrics, NotificationConsumer, NotificationProducer, OperationalStatus, PullPoint, PullPointCreation, QueryCapability, RelationshipResource, Relationships, ScheduledTermination, ServiceGroup, ServiceGroupRegistration, SetCapability, State, SubscriptionManager, WsResourceCapability

All Known Implementing Classes:
  AbstractAdvertisement, AbstractCapability, AbstractManageabilityCapability, AbstractWsResourceCapability, SimpleConfiguration, SimpleCorrelatableProperties, SimpleDescription, SimpleEntry, SimpleGetCapability, SimpleIdentity, SimpleImmediateTermination, SimpleManageabilityCharacteristics, SimpleMetadataExchange, SimpleMetrics, SimpleNotificationConsumer, SimpleNotificationProducer, SimpleOperationalStatus, SimplePullPoint, SimplePullPointCreation, SimpleQueryCapability, SimpleRelationshipResource, SimpleRelationships, SimpleScheduledTermination, SimpleServiceGroup, SimpleServiceGroupRegistration, SimpleSetCapability, SimpleState, SimpleSubscriptionManager

public interface Capability
extends Initialization, InitializationParameters, Shutdown

Capability is the atomic unit of functional definition for a resource type. A capability class should define a set of data and operations that are closely-related, but do not necessarily make up the entire definition of a resource interface. Users aggregate capabilities into a Resource, which takes care of delegating requests to the appropriate capabilities at runtime. Most users will only have to interact with the pluggable nature of Muse development through this interface and the <capability/> tag in muse.xml.

Author:
  Dan Jemiolo (danj)

Method Summary
`java.util.Collection` | `getActions()`
`java.lang.String` | `getCapabilityURI()`
`Environment` | `getEnvironment()`
`java.util.logging.Logger` | `getLog()`
`MessageHandler` | `getMessageHandler(java.lang.String action)`
`Persistence` | `getPersistence()`
`Resource` | `getResource()`
`void` | `initializeCompleted()` This method is called by the containing Resource after all other capabilities have been initialized via initialize().
`void` | `prepareShutdown()` This method is called prior to shutdown() and allows the capability to do any shutdown tasks that require the presence of certain other capabilities.
`void` | `setCapabilityURI(java.lang.String capabilityURI)`
`void` | `setEnvironment(Environment environment)`
`void` | `setLog(java.util.logging.Logger log)`
`void` | `setMessageHandlers(java.util.Collection handlers)`
`void` | `setPersistence(Persistence persistence)`
`void` | `setResource(Resource resource)`

Methods inherited from interface org.apache.muse.core.Initialization
`hasBeenInitialized, initialize`

Methods inherited from interface org.apache.muse.core.InitializationParameters
`getInitializationParameter, getInitializationParameters, setInitializationParameters`

Methods inherited from interface org.apache.muse.core.Shutdown
`hasBeenShutdown, shutdown`

Method Detail

### getActions

    public java.util.Collection getActions()

  Returns:
    All of the WS-A Action URIs for which the capability has a MessageHandler.
  See Also:
    `getMessageHandler(String)`

### getCapabilityURI

    public java.lang.String getCapabilityURI()

  Returns:
    The unique URI (within the resource type) that defines this capability.

### getEnvironment

    public Environment getEnvironment()

  Returns:
    The capability's access point for things such as the WS-Addressing context, file system resources, and more.

### getLog

    public java.util.logging.Logger getLog()

  Returns:
    The JDK logger that writes to the Muse log file.

### getMessageHandler

    public MessageHandler getMessageHandler(java.lang.String action)

  Parameters:
    `action` -
  Returns:
    This method is called as part of the containing Resource's method invocation process; it allows the capability to specify the handler that will parse the request/response for the method.
  See Also:
    `getActions()`

### getPersistence

    public Persistence getPersistence()

  Returns:
    The persistence mechanism for this capability, or null if none was defined.

### getResource

    public Resource getResource()

  Returns:
    The resource that contains this capability instance.

### initializeCompleted

    public void initializeCompleted()
                             throws SoapFault

  This method is called by the containing Resource after all other capabilities have been initialized via initialize(). It allows the Capability to do initialization work that requires the presence of certain other capabilities. This "post-initialization" state is necessary because capability definition and creation is non-deterministic, and users cannot make any assumptions about the order of those tasks.

  Throws:
    `SoapFault`

### prepareShutdown

    public void prepareShutdown()
                         throws SoapFault

  This method is called prior to shutdown() and allows the capability to do any shutdown tasks that require the presence of certain other capabilities. Once shutdown() is called, the capability cannot be certain that the other capabilities it depends on have not already been shutdown as well, so this "pre-shutdown" state gives it this opportunity.

  Throws:
    `SoapFault`

### setCapabilityURI

    public void setCapabilityURI(java.lang.String capabilityURI)

### setEnvironment

    public void setEnvironment(Environment environment)

### setLog

    public void setLog(java.util.logging.Logger log)

### setMessageHandlers

    public void setMessageHandlers(java.util.Collection handlers)

### setPersistence

    public void setPersistence(Persistence persistence)

### setResource

    public void setResource(Resource resource)

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD