ome.services.blitz.util
Class ServantHolder

java.lang.Object
  extended by ome.services.blitz.util.ServantHolder

public class ServantHolder
extends Object

Manager for all active servants in a single ServiceFactoryI. To reduce the need of using Util.stringToIdentity(String) and Util.identityToString(Ice.Identity) the servant tries to make the two usages equivalent.

Since:
3.0-Beta4
Author:
Josh Moore, josh at glencoesoftware.com

Constructor Summary
ServantHolder()
           
 
Method Summary
 void acquireLock(String key)
          Acquires the given lock or if necessary creates a new one.
 Ice.Object get(Ice.Identity id)
           
 Ice.Object get(String key)
           
 List<String> getServantList()
           
 void put(String key, Ice.Object servant)
           
 void releaseLock(String key)
          Releases the given lock if found, otherwise throws an InternalException
 Ice.Object remove(Ice.Identity id)
           
 Ice.Object remove(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServantHolder

public ServantHolder()
Method Detail

acquireLock

public void acquireLock(String key)
Acquires the given lock or if necessary creates a new one.

Parameters:
key -

releaseLock

public void releaseLock(String key)
Releases the given lock if found, otherwise throws an InternalException


get

public Ice.Object get(String key)

get

public Ice.Object get(Ice.Identity id)

put

public void put(String key,
                Ice.Object servant)

remove

public Ice.Object remove(String key)

remove

public Ice.Object remove(Ice.Identity id)

getServantList

public List<String> getServantList()


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.