org.apache.muse.ws.resource.sg.impl
Class SimpleEntry

java.lang.Object
  extended by org.apache.muse.core.AbstractCapability
      extended by org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
          extended by org.apache.muse.ws.resource.sg.impl.SimpleEntry
All Implemented Interfaces:
Capability, Initialization, InitializationParameters, Shutdown, XmlSerializable, Entry, WsResourceCapability

public class SimpleEntry
extends AbstractWsResourceCapability
implements Entry

SimpleEntry is Muse's default implementation of the WS-RF ServiceGroupEntry capability. This capability provides all of the Entry-specific properties needed to quality the resource as a service group entry. Because entries are also serialized as properties in the service group itself, this class also provides XML serialization.

Author:
Dan Jemiolo (danj)

Field Summary
protected static Messages _MESSAGES
           
 
Fields inherited from interface org.apache.muse.ws.resource.sg.Entry
PROPERTIES
 
Constructor Summary
SimpleEntry()
           
 
Method Summary
 void deleteProperty(QName property)
           
 Element getContent()
          This implementation reads the content values on-the-fly, creating a client to the member resource and using the WSRP GetMultipleResourceProperties operation to discover the property values.
protected  WsResourceClient getMemberClient()
           
 EndpointReference getMemberEPR()
           
 Element[] getProperty(QName property)
           
 QName[] getPropertyNames()
          Concrete capability classes that define properties MUST override this method and provide the names of the properties.
protected  WsResource getServiceGroup()
           
 EndpointReference getServiceGroupEPR()
           
 void insertProperty(QName property, Element[] values)
           
 void setMemberEPR(EndpointReference memberEPR)
           
 void setServiceGroup(WsResource serviceGroup)
           
 void shutdown()
           
 Element toXML()
          Converts this object into an XML representation, as defined by its related schema or specification.
 Element toXML(Document doc)
          Converts this object into an XML representation, as defined by its related schema or specification.
 void updateProperty(QName property, Element[] values)
           
 
Methods inherited from class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
createGettersAndSetters, deleteProperty, getGetter, getProperty, getPropertyElements, getSetter, getWsResource, initialize, insertProperty, invokeMethod, setResource, updateProperty
 
Methods inherited from class org.apache.muse.core.AbstractCapability
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setInitializationParameters, setLog, setMessageHandler, setMessageHandlers, setPersistence
 
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.ws.resource.WsResourceCapability
getWsResource
 
Methods inherited from interface org.apache.muse.core.Capability
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, 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
 

Field Detail

_MESSAGES

protected static Messages _MESSAGES
Constructor Detail

SimpleEntry

public SimpleEntry()
Method Detail

getContent

public Element getContent()
                   throws BaseFault
This implementation reads the content values on-the-fly, creating a client to the member resource and using the WSRP GetMultipleResourceProperties operation to discover the property values.

Specified by:
getContent in interface Entry
Returns:
The values of resource the properties (Element[]) that are found in the service group's MembershipContentRules and which are defined by the member service. The list may be empty if there were no membership rules. The values returned are not guaranteed to be current - they may include a snapshot of the values from when the entry was created. If you are unsure of the mutability of these values, you should ask the member resource directly.
Throws:
BaseFault

getMemberClient

protected WsResourceClient getMemberClient()

getMemberEPR

public EndpointReference getMemberEPR()
Specified by:
getMemberEPR in interface Entry
Returns:
The EPR for the service group member this entry represents.

getPropertyNames

public QName[] getPropertyNames()
Concrete capability classes that define properties MUST override this method and provide the names of the properties.

Overrides:
getPropertyNames in class AbstractWsResourceCapability
Returns:
The names of the resource properties defined by this capability.

getServiceGroup

protected WsResource getServiceGroup()

getServiceGroupEPR

public EndpointReference getServiceGroupEPR()
Specified by:
getServiceGroupEPR in interface Entry
Returns:
The EPR for the service group to which this entry belongs.

setMemberEPR

public void setMemberEPR(EndpointReference memberEPR)
Specified by:
setMemberEPR in interface Entry

setServiceGroup

public void setServiceGroup(WsResource serviceGroup)
Specified by:
setServiceGroup in interface Entry

shutdown

public void shutdown()
              throws SoapFault
Specified by:
shutdown in interface Shutdown
Overrides:
shutdown in class AbstractCapability
Throws:
SoapFault

toXML

public Element toXML()
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Returns:
An XML representation of this object.

toXML

public Element toXML(Document doc)
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Parameters:
doc - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
Returns:
An XML representation of this object.

deleteProperty

public void deleteProperty(QName property)
                    throws BaseFault
Throws:
BaseFault

getProperty

public Element[] getProperty(QName property)
                      throws BaseFault
Throws:
BaseFault

insertProperty

public void insertProperty(QName property,
                           Element[] values)
                    throws BaseFault
Throws:
BaseFault

updateProperty

public void updateProperty(QName property,
                           Element[] values)
                    throws BaseFault
Throws:
BaseFault


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