uk.ac.soton.itinnovation.grid.client.engine.impl
Class LocalRegistry

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.client.engine.impl.LocalRegistry
All Implemented Interfaces:
SimpleRegistry
Direct Known Subclasses:
PersistentRegistry

public class LocalRegistry
extends Object
implements SimpleRegistry

A simple implementation of the Registry using a HashMap to store key value pairs of String to EndpointReferenceType

Author:
mm

Field Summary
protected  Map<String,org.apache.axis.message.addressing.EndpointReferenceType> resources
           
 
Constructor Summary
LocalRegistry()
           
LocalRegistry(org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 
Method Summary
 void dump()
           
 org.apache.axis.message.addressing.EndpointReferenceType findResourceByEPR(org.apache.axis.message.addressing.EndpointReferenceType reference)
          Find a resource by searching for its address and reference (conversation ID) taken from an EPR
 org.apache.axis.message.addressing.EndpointReferenceType findResourceByName(String label)
           
 org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesAtService(org.apache.axis.message.addressing.EndpointReferenceType service)
          Find all resources in the registry at a particular service
 org.apache.axis.message.addressing.EndpointReferenceType getEndpointRef()
           
 org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String type)
          Gets registered resources given a resource/service type.
 org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
           
 void registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Add 'resource' to the list of resources registered to this account.
 void setEndpoint(org.apache.axis.message.addressing.EndpointReferenceType epr)
           
 String toString()
           
 void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).
 void updateResource(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Updates and existing registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resources

protected Map<String,org.apache.axis.message.addressing.EndpointReferenceType> resources
Constructor Detail

LocalRegistry

public LocalRegistry()

LocalRegistry

public LocalRegistry(org.apache.axis.message.addressing.EndpointReferenceType epr)
Method Detail

registerResource

public void registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
Description copied from interface: SimpleRegistry
Add 'resource' to the list of resources registered to this account.

Specified by:
registerResource in interface SimpleRegistry
Parameters:
resource - the resource to be added

findResourcesAtService

public org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesAtService(org.apache.axis.message.addressing.EndpointReferenceType service)
Description copied from interface: SimpleRegistry
Find all resources in the registry at a particular service

Specified by:
findResourcesAtService in interface SimpleRegistry
Parameters:
service - The EPR of the service
Returns:
All resources at the service

findResourceByName

public org.apache.axis.message.addressing.EndpointReferenceType findResourceByName(String label)

getRegisteredResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String type)
Description copied from interface: SimpleRegistry
Gets registered resources given a resource/service type.

Specified by:
getRegisteredResources in interface SimpleRegistry
Returns:
An array of EPRs matching the type or all EPRs if type is null

getEndpointRef

public org.apache.axis.message.addressing.EndpointReferenceType getEndpointRef()

setEndpoint

public void setEndpoint(org.apache.axis.message.addressing.EndpointReferenceType epr)

findResourceByEPR

public org.apache.axis.message.addressing.EndpointReferenceType findResourceByEPR(org.apache.axis.message.addressing.EndpointReferenceType reference)
Description copied from interface: SimpleRegistry
Find a resource by searching for its address and reference (conversation ID) taken from an EPR

Specified by:
findResourceByEPR in interface SimpleRegistry
Parameters:
reference - the EPR to look for
Returns:
The resource matching the EPR or null (although the return value has the same type it may have additional meta-data)

dump

public void dump()

getResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()

unregisterResource

public void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
Description copied from interface: SimpleRegistry
Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).

Specified by:
unregisterResource in interface SimpleRegistry

updateResource

public void updateResource(org.apache.axis.message.addressing.EndpointReferenceType epr)
                    throws IllegalArgumentException
Description copied from interface: SimpleRegistry
Updates and existing registry

Specified by:
updateResource in interface SimpleRegistry
Parameters:
epr - The endpoint to be updated
Throws:
IllegalArgumentException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.