org.globus.wsrf.impl
Class SimpleResourceKey

java.lang.Object
  extended byorg.globus.wsrf.impl.SimpleResourceKey
All Implemented Interfaces:
ResourceKey, java.io.Serializable

public class SimpleResourceKey
extends java.lang.Object
implements ResourceKey

A basic implementation of ResourceKey.

See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log logger
           
private  javax.xml.namespace.QName name
           
private  java.lang.Object value
           
 
Constructor Summary
SimpleResourceKey(javax.xml.namespace.QName name, java.lang.Object value)
          Creates a new SimpleResourceKey.
SimpleResourceKey(javax.xml.soap.SOAPElement header, java.lang.Class type)
          Creates a new SimpleResourceKey.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 javax.xml.namespace.QName getName()
          The name of the key.
 java.lang.Object getValue()
          The actual key value.
 int hashCode()
           
 javax.xml.soap.SOAPElement toSOAPElement()
          Converts the resource key into a SOAPElement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static org.apache.commons.logging.Log logger

name

private javax.xml.namespace.QName name

value

private java.lang.Object value
Constructor Detail

SimpleResourceKey

public SimpleResourceKey(javax.xml.soap.SOAPElement header,
                         java.lang.Class type)
                  throws InvalidResourceKeyException
Creates a new SimpleResourceKey.

Parameters:
header - the SOAPElement containing the key. The element's name and namespace are used as key name.
type - the type of the key. The SOAPElement will be deserialized into this type using ObjectDeserializer.toObject().
Throws:
InvalidResourceKeyException - if deserialization of the key fails.

SimpleResourceKey

public SimpleResourceKey(javax.xml.namespace.QName name,
                         java.lang.Object value)
Creates a new SimpleResourceKey.

Parameters:
name - the name of the key
value - the value of the key. The value of the key can be any simple/primitive type or any WSDL2Java generated type or any other type with proper type mappings.
Method Detail

getName

public javax.xml.namespace.QName getName()
Description copied from interface: ResourceKey
The name of the key.

Specified by:
getName in interface ResourceKey
Returns:
the name of the key. Cannot be null.

getValue

public java.lang.Object getValue()
Description copied from interface: ResourceKey
The actual key value.

Specified by:
getValue in interface ResourceKey
Returns:
the key value. Cannot be null.

toSOAPElement

public javax.xml.soap.SOAPElement toSOAPElement()
                                         throws SerializationException
Description copied from interface: ResourceKey
Converts the resource key into a SOAPElement. The element name and namespace must match the name of the key.

Specified by:
toSOAPElement in interface ResourceKey
Returns:
the resource key as a SOAPElement
Throws:
SerializationException - in case the conversion fails.

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()