org.jpos.space
Class SpaceProxy

java.lang.Object
  extended by org.jpos.space.SpaceProxy
All Implemented Interfaces:
Remote, Configurable, RemoteSpace

public class SpaceProxy
extends Object
implements RemoteSpace, Configurable

RMI Space Proxy

Since:
1.4.9
Version:
$Revision$ $Date$
Author:
Alejandro Revilla, Niclas Hedhman

Constructor Summary
SpaceProxy()
           
SpaceProxy(String spaceUri)
           
 
Method Summary
 boolean equals(Object obj)
           
 Set getKeySet()
           
 int hashCode()
           
 Serializable in(Serializable key)
          Take an entry from the space, waiting forever until one exists.
 Serializable in(Serializable key, long timeout)
          Take an entry from the space, waiting a limited amount of time until one exists.
 Serializable inp(Serializable key)
          In probe takes an entry from the space if one exists, return null otherwise.
 void out(Serializable key, Serializable value)
          Write a new entry into the Space
 void out(Serializable key, Serializable value, long timeout)
          Write a new leased entry into the Space.
 Serializable rd(Serializable key)
          Read an entry from the space, waiting forever until one exists.
 Serializable rd(Serializable key, long timeout)
          Read an entry from the space, waiting a limited amount of time until one exists.
 Serializable rdp(Serializable key)
          Read probe reads an entry from the space if one exists, return null otherwise.
 void setConfiguration(Configuration cfg)
           
 void shutdown()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpaceProxy

public SpaceProxy()
           throws RemoteException
Throws:
RemoteException

SpaceProxy

public SpaceProxy(String spaceUri)
           throws RemoteException
Throws:
RemoteException
Method Detail

out

public void out(Serializable key,
                Serializable value)
         throws RemoteException
Description copied from interface: RemoteSpace
Write a new entry into the Space

Specified by:
out in interface RemoteSpace
Parameters:
key - Entry's key
value - Object value
Throws:
RemoteException

out

public void out(Serializable key,
                Serializable value,
                long timeout)
         throws RemoteException
Description copied from interface: RemoteSpace
Write a new leased entry into the Space. Entry will remain valid for a limited amount of time.

Specified by:
out in interface RemoteSpace
Parameters:
key - Entry's key
value - Object value
timeout - entry valid time
Throws:
RemoteException
See Also:
LeasedReference

in

public Serializable in(Serializable key)
                throws RemoteException
Description copied from interface: RemoteSpace
Take an entry from the space, waiting forever until one exists.

Specified by:
in in interface RemoteSpace
Parameters:
key - Entry's key
Returns:
value
Throws:
RemoteException

rd

public Serializable rd(Serializable key)
                throws RemoteException
Description copied from interface: RemoteSpace
Read an entry from the space, waiting forever until one exists.

Specified by:
rd in interface RemoteSpace
Parameters:
key - Entry's key
Returns:
value
Throws:
RemoteException

in

public Serializable in(Serializable key,
                       long timeout)
                throws RemoteException
Description copied from interface: RemoteSpace
Take an entry from the space, waiting a limited amount of time until one exists.

Specified by:
in in interface RemoteSpace
Parameters:
key - Entry's key
timeout - millis to wait
Returns:
value or null
Throws:
RemoteException

rd

public Serializable rd(Serializable key,
                       long timeout)
                throws RemoteException
Description copied from interface: RemoteSpace
Read an entry from the space, waiting a limited amount of time until one exists.

Specified by:
rd in interface RemoteSpace
Parameters:
key - Entry's key
timeout - millis to wait
Returns:
value or null
Throws:
RemoteException

inp

public Serializable inp(Serializable key)
                 throws RemoteException
Description copied from interface: RemoteSpace
In probe takes an entry from the space if one exists, return null otherwise.

Specified by:
inp in interface RemoteSpace
Parameters:
key - Entry's key
Returns:
value or null
Throws:
RemoteException

rdp

public Serializable rdp(Serializable key)
                 throws RemoteException
Description copied from interface: RemoteSpace
Read probe reads an entry from the space if one exists, return null otherwise.

Specified by:
rdp in interface RemoteSpace
Parameters:
key - Entry's key
Returns:
value or null
Throws:
RemoteException

shutdown

public void shutdown()

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - Configuration object
Throws:
ConfigurationException

getKeySet

public Set getKeySet()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 1998-2012 jPOS.org. All Rights Reserved.