org.mmbase.bridge.remote.util
Class StubToLocalMapper

java.lang.Object
  extended byorg.mmbase.bridge.remote.util.StubToLocalMapper

public class StubToLocalMapper
extends java.lang.Object

StubToLocalMapper is a utitity class that helps a Stub to find it's Local implementation

Version:
$Id: StubToLocalMapper.java,v 1.2 2003/07/22 12:55:14 keesj Exp $
Author:
Kees Jongenburger

Constructor Summary
StubToLocalMapper()
           
 
Method Summary
static java.lang.String add(java.lang.Object object)
          add an object to the mapper
static java.lang.Object get(java.lang.String mapperCode)
          get an object based on its MapperCode
static boolean remove(java.lang.String mapperCode)
          remove an entry in the StubToLocal mapper the entry is only removed if there are no other referances to the entry (ref counting)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubToLocalMapper

public StubToLocalMapper()
Method Detail

add

public static java.lang.String add(java.lang.Object object)
add an object to the mapper

Parameters:
object - the object to add to the mapper
Returns:
a string that can later be used to find back the object or remove it (MapperCode)

get

public static java.lang.Object get(java.lang.String mapperCode)
get an object based on its MapperCode

Parameters:
mapperCode - the Mappercode of the object
Returns:
the required object or null if there was no such object

remove

public static boolean remove(java.lang.String mapperCode)
remove an entry in the StubToLocal mapper the entry is only removed if there are no other referances to the entry (ref counting)

Parameters:
mapperCode - the MapperCode of the object to be removed
Returns:
true if the entry was removed because refcount was 0


MMBase build 1.7.1.20041002