jPOS 1.6.5 API Documentation

org.jpos.space
Class SpaceProxy

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

public class SpaceProxy
extends java.lang.Object
implements RemoteSpace, ReConfigurable

RMI Space Proxy

Since:
1.4.9
Version:
$Revision: 2776 $ $Date: 2009-09-18 18:53:31 -0700 (Fri, 18 Sep 2009) $
Author:
Alejandro Revilla, Niclas Hedhman

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

Constructor Detail

SpaceProxy

public SpaceProxy()
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

SpaceProxy

public SpaceProxy(java.lang.String spaceUri)
           throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

out

public void out(java.io.Serializable key,
                java.io.Serializable value)
         throws java.rmi.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:
java.rmi.RemoteException

out

public void out(java.io.Serializable key,
                java.io.Serializable value,
                long timeout)
         throws java.rmi.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:
java.rmi.RemoteException
See Also:
LeasedReference

in

public java.io.Serializable in(java.io.Serializable key)
                        throws java.rmi.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:
java.rmi.RemoteException

rd

public java.io.Serializable rd(java.io.Serializable key)
                        throws java.rmi.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:
java.rmi.RemoteException

in

public java.io.Serializable in(java.io.Serializable key,
                               long timeout)
                        throws java.rmi.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:
java.rmi.RemoteException

rd

public java.io.Serializable rd(java.io.Serializable key,
                               long timeout)
                        throws java.rmi.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:
java.rmi.RemoteException

inp

public java.io.Serializable inp(java.io.Serializable key)
                         throws java.rmi.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:
java.rmi.RemoteException

rdp

public java.io.Serializable rdp(java.io.Serializable key)
                         throws java.rmi.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:
java.rmi.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 java.util.Set getKeySet()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

jPOS.org