org.globus.ogsa
Class ServiceData

java.lang.Object
  extended byorg.globus.ogsa.ServiceData

public class ServiceData
extends java.lang.Object

This class defines a wrapper around a collection of service data value for a service data element. The name of the Service Data object is the same as the XML schema element representaion of the values. The values can either be contained in the wrapper, or a callback can be registered to dynamically obtain the values. The class can be used to trigger notifications on a service data element (notifyChange), and it allows service data elements to be converted into DOM Elements (externalizeElement) or XML strings (externalizeString).


Field Summary
static MutabilityType CONSTANT
           
static QName CONTENT
           
static QName CREATE_EXTENSIBILITY
           
static QName ENTRY
           
static MutabilityType EXTENDABLE
           
static QName FACTORY_LOCATOR
           
static QName FIND_EXTENSIBILITY
           
static QName HANDLE
           
static QName HANDLE_RESOLVER_SCHEME
           
static QName INTERFACE
           
static QName MEMBER_LOCATOR
           
static QName MEMBERSHIP_CONTENT_RULE
           
static MutabilityType MUTABLE
           
static QName NAME
           
static QName NOTIFIABLE_NAME
           
static QName REFERENCE
           
static QName SET_EXTENSIBILITY
           
static QName SINK_LOCATOR
           
static MutabilityType STATIC
           
static QName SUBSCRIBE_EXTENSIBILITY
           
static QName SUBSCRIPTION_EXPRESSION
           
static QName TERMINATION
           
 
Constructor Summary
ServiceData(QName name, ServiceDataSet serviceDataSet)
           
ServiceData(ServiceDataSet serviceDataSet)
           
 
Method Summary
 void addValue(java.lang.Object value)
          appends a new value to the service data element collection
 org.w3c.dom.Element[] externalizeElement()
          gets DOM Element representaions of this service data element collection
 MessageElement[] externalizeMessage()
          gets an unwrapped any (SOAP Element) representaion of this service data element collection
 java.lang.String[] externalizeString()
          gets XML string representaions of this service data element collection
 boolean getModifiable()
           
 MutabilityType getMutability()
           
 QName getName()
           
 java.util.Map getProperties()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object getValue()
           
 java.lang.Object getValue(int index)
           
 java.util.Collection getValues()
           
 void init(ServiceDataType descriptor)
           
 boolean isNotifiable()
           
 void notifyChange()
          sends out a notification to all subscribers of this service data element
 void notifyChangeWithAck()
          like notifyChange but returns first when notifications have been sent out to all subscribers
 java.lang.Object removeValue(int index)
           
 boolean removeValue(java.lang.Object obj)
           
 void resetValues()
           
 void setCallback(ServiceDataValueCallback callback)
           
 void setModifiable(boolean modifiable)
           
 void setMutability(MutabilityType mutability)
           
 void setName(QName qname)
           
 void setNotifiable(boolean notifiable)
          enables or disables notification support of these service data elements
 void setProperty(java.lang.String name, java.lang.Object value)
           
 void setValue(java.lang.Object value)
          sets the current value, and overwrites the previous one
 void setValues(java.util.Collection collection)
           
 void setValues(java.lang.Object[] values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATIC

public static final MutabilityType STATIC

CONSTANT

public static final MutabilityType CONSTANT

EXTENDABLE

public static final MutabilityType EXTENDABLE

MUTABLE

public static final MutabilityType MUTABLE

HANDLE

public static final QName HANDLE

REFERENCE

public static final QName REFERENCE

INTERFACE

public static final QName INTERFACE

FACTORY_LOCATOR

public static final QName FACTORY_LOCATOR

TERMINATION

public static final QName TERMINATION

NAME

public static final QName NAME

FIND_EXTENSIBILITY

public static final QName FIND_EXTENSIBILITY

SET_EXTENSIBILITY

public static final QName SET_EXTENSIBILITY

CREATE_EXTENSIBILITY

public static final QName CREATE_EXTENSIBILITY

HANDLE_RESOLVER_SCHEME

public static final QName HANDLE_RESOLVER_SCHEME

NOTIFIABLE_NAME

public static final QName NOTIFIABLE_NAME

SUBSCRIBE_EXTENSIBILITY

public static final QName SUBSCRIBE_EXTENSIBILITY

SUBSCRIPTION_EXPRESSION

public static final QName SUBSCRIPTION_EXPRESSION

SINK_LOCATOR

public static final QName SINK_LOCATOR

MEMBERSHIP_CONTENT_RULE

public static final QName MEMBERSHIP_CONTENT_RULE

ENTRY

public static final QName ENTRY

MEMBER_LOCATOR

public static final QName MEMBER_LOCATOR

CONTENT

public static final QName CONTENT
Constructor Detail

ServiceData

public ServiceData(ServiceDataSet serviceDataSet)

ServiceData

public ServiceData(QName name,
                   ServiceDataSet serviceDataSet)
Method Detail

init

public void init(ServiceDataType descriptor)

setMutability

public void setMutability(MutabilityType mutability)

getMutability

public MutabilityType getMutability()

setModifiable

public void setModifiable(boolean modifiable)

getModifiable

public boolean getModifiable()

getName

public QName getName()

setName

public void setName(QName qname)

getValues

public java.util.Collection getValues()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)
sets the current value, and overwrites the previous one

Parameters:
value - must be serializable, that is have a registered XML typemapping, or contain meta data that allows the JAX-RPC engine to serialize it. Note all basic types have pre registered typemappings and beans generated with a JAX-RPC WSDL to Java engine typically has the required meta data to get serialized.

addValue

public void addValue(java.lang.Object value)
appends a new value to the service data element collection


getValue

public java.lang.Object getValue(int index)

removeValue

public java.lang.Object removeValue(int index)

removeValue

public boolean removeValue(java.lang.Object obj)

resetValues

public void resetValues()

setValues

public void setValues(java.util.Collection collection)

setValues

public void setValues(java.lang.Object[] values)

setNotifiable

public void setNotifiable(boolean notifiable)
enables or disables notification support of these service data elements

Parameters:
notifiable - if true (default) these service data elemenets will be exposed as possible targets for subscription

isNotifiable

public boolean isNotifiable()

notifyChange

public void notifyChange()
sends out a notification to all subscribers of this service data element


notifyChangeWithAck

public void notifyChangeWithAck()
like notifyChange but returns first when notifications have been sent out to all subscribers


setCallback

public void setCallback(ServiceDataValueCallback callback)

externalizeMessage

public MessageElement[] externalizeMessage()
                                    throws GridServiceException
gets an unwrapped any (SOAP Element) representaion of this service data element collection

Throws:
GridServiceException

externalizeElement

public org.w3c.dom.Element[] externalizeElement()
                                         throws GridServiceException
gets DOM Element representaions of this service data element collection

Throws:
GridServiceException

externalizeString

public java.lang.String[] externalizeString()
                                     throws GridServiceException
gets XML string representaions of this service data element collection

Throws:
GridServiceException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)

getProperty

public java.lang.Object getProperty(java.lang.String name)

getProperties

public java.util.Map getProperties()