org.apache.muse.ws.dm.muws.adv.impl
Class AbstractAdvertisement

java.lang.Object
  extended by org.apache.muse.core.AbstractCapability
      extended by org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement
All Implemented Interfaces:
Capability, Initialization, InitializationParameters, ResourceManagerListener, Shutdown, Advertisement
Direct Known Subclasses:
BroadcastAdvertisement, SimpleAdvertisement

public abstract class AbstractAdvertisement
extends AbstractCapability
implements Advertisement, ResourceManagerListener

Author:
Dan Jemiolo (danj)

Constructor Summary
AbstractAdvertisement()
           
 
Method Summary
protected  WefFactory createWefFactory()
           
 void initializeCompleted()
          This method is called by the containing Resource after all other capabilities have been initialized via initialize().
protected abstract  boolean isAdvertised(EndpointReference epr)
           
 void resourceAdded(EndpointReference epr, Resource resource)
           
 void resourceRemoved(EndpointReference epr)
           
protected  void sendMessage(EndpointReference sourceEPR, QName topicName, QName situationCategory, Element payload)
           
protected  void subscribeInitialConsumer()
           
 
Methods inherited from class org.apache.muse.core.AbstractCapability
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, initialize, prepareShutdown, setCapabilityURI, setEnvironment, setInitializationParameters, setLog, setMessageHandler, setMessageHandlers, setPersistence, setResource, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.muse.core.Capability
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource
 
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
 

Constructor Detail

AbstractAdvertisement

public AbstractAdvertisement()
Method Detail

createWefFactory

protected WefFactory createWefFactory()

initializeCompleted

public void initializeCompleted()
                         throws SoapFault
Description copied from interface: Capability
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.

Specified by:
initializeCompleted in interface Capability
Overrides:
initializeCompleted in class AbstractCapability
Throws:
SoapFault

isAdvertised

protected abstract boolean isAdvertised(EndpointReference epr)

resourceAdded

public void resourceAdded(EndpointReference epr,
                          Resource resource)
                   throws SoapFault
Specified by:
resourceAdded in interface ResourceManagerListener
Parameters:
epr - The unique EPR that is being associated with the new resource. This value should always be used over Resource.getEndpointReference() because some applications may choose to map multiple EPRs to the same resource instance, and thus getEndpointReference() will not provide an accurate value.
resource - The resource instance being associated with the given EPR.
Throws:
SoapFault

resourceRemoved

public void resourceRemoved(EndpointReference epr)
                     throws SoapFault
Specified by:
resourceRemoved in interface ResourceManagerListener
Parameters:
epr - The unique EPR of the resource that has been destroyed - the Resource object is not provided because it would most likely be in an inconsistent state. At this point, the resource has already been 'destroyed'.
Throws:
SoapFault

sendMessage

protected void sendMessage(EndpointReference sourceEPR,
                           QName topicName,
                           QName situationCategory,
                           Element payload)
                    throws SoapFault
Throws:
SoapFault

subscribeInitialConsumer

protected void subscribeInitialConsumer()
                                 throws SoapFault
Throws:
SoapFault


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.