org.objectweb.carol.jndi.registry
Class ManageableRegistry

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended bysun.rmi.registry.RegistryImpl
              extended byorg.objectweb.carol.jndi.registry.ManageableRegistry
All Implemented Interfaces:
java.rmi.registry.Registry, java.rmi.Remote, java.io.Serializable

public class ManageableRegistry
extends sun.rmi.registry.RegistryImpl

Author:
riviereg Manageable Registry for Carol
See Also:
Serialized Form

Field Summary
static java.rmi.server.ObjID id
           
static ManageableRegistry manageableRegistry
           
static RegistryFireWall readFirewall
           
static java.lang.String REGISTRY_MANAGER_NAME
           
 java.util.Properties regProps
           
 java.util.Hashtable remoteObjectTable
           
static boolean verbose
           
static RegistryFireWall writeFirewall
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface java.rmi.registry.Registry
REGISTRY_PORT
 
Constructor Summary
ManageableRegistry(int port)
           
ManageableRegistry(int port, java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf)
           
 
Method Summary
 void addReadAllowAddress(java.net.InetAddress i)
          remove a read forbiden adress
 void addReadForbidenAddress(java.net.InetAddress i)
          add a read forbiden address
 void addWriteAllowAddress(java.net.InetAddress i)
          remove a write forbiden adress
 void addWriteForbidenAddress(java.net.InetAddress i)
          add a write forbiden address
 void allowReadAll()
          Allow everybody read
 void allowWriteAll()
          Allow everybody write
 void bind(java.lang.String name, java.rmi.Remote obj)
           
static void checkReadAccess(java.lang.String name)
           
static void checkWriteAccess()
           
static java.rmi.registry.Registry createManagableRegistry(int port)
           
 void forbidReadAll()
          Forbid everybody read
 void forbidWriteAll()
          Forbid everybody write
static java.rmi.server.ObjID getID()
           
 boolean isReadAllow(java.net.InetAddress i)
          Tets if a InetAdress is allow to read
 boolean isReadAllowAll()
          is read allow for all
 boolean isWriteAllow(java.net.InetAddress i)
          Tets if a InetAdress is allow for writting
 boolean isWriteAllowAll()
          is allow for all writer
 java.lang.String[] list()
           
 java.net.InetAddress[] listReadAllowedAddress()
          list read Allowed Adress
 java.net.InetAddress[] listReadForbidenAddress()
          list read forbiden adress
 java.net.InetAddress[] listWriteAllowedAddress()
          list write Allowed Adress
 java.net.InetAddress[] listWriteForbidenAddress()
          list write forbiden adress
 java.rmi.Remote lookup(java.lang.String name)
           
static void main(java.lang.String[] args)
           
 void purge()
           
 void rebind(java.lang.String name, java.rmi.Remote obj)
           
 void setVerbose(boolean v)
          Set verbose
 void unbind(java.lang.String name)
           
 
Methods inherited from class sun.rmi.registry.RegistryImpl
checkAccess
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

remoteObjectTable

public java.util.Hashtable remoteObjectTable

manageableRegistry

public static ManageableRegistry manageableRegistry

id

public static java.rmi.server.ObjID id

writeFirewall

public static RegistryFireWall writeFirewall

readFirewall

public static RegistryFireWall readFirewall

REGISTRY_MANAGER_NAME

public static java.lang.String REGISTRY_MANAGER_NAME

regProps

public java.util.Properties regProps

verbose

public static boolean verbose
Constructor Detail

ManageableRegistry

public ManageableRegistry(int port,
                          java.rmi.server.RMIClientSocketFactory csf,
                          java.rmi.server.RMIServerSocketFactory ssf)
                   throws java.rmi.RemoteException

ManageableRegistry

public ManageableRegistry(int port)
                   throws java.rmi.RemoteException
Method Detail

setVerbose

public void setVerbose(boolean v)
Set verbose


lookup

public java.rmi.Remote lookup(java.lang.String name)
                       throws java.rmi.RemoteException,
                              java.rmi.NotBoundException
Throws:
java.rmi.RemoteException
java.rmi.NotBoundException

bind

public void bind(java.lang.String name,
                 java.rmi.Remote obj)
          throws java.rmi.RemoteException,
                 java.rmi.AlreadyBoundException,
                 java.rmi.AccessException
Throws:
java.rmi.RemoteException
java.rmi.AlreadyBoundException
java.rmi.AccessException

unbind

public void unbind(java.lang.String name)
            throws java.rmi.RemoteException,
                   java.rmi.NotBoundException,
                   java.rmi.AccessException
Throws:
java.rmi.RemoteException
java.rmi.NotBoundException
java.rmi.AccessException

rebind

public void rebind(java.lang.String name,
                   java.rmi.Remote obj)
            throws java.rmi.RemoteException,
                   java.rmi.AccessException
Throws:
java.rmi.RemoteException
java.rmi.AccessException

list

public java.lang.String[] list()
                        throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getID

public static java.rmi.server.ObjID getID()

createManagableRegistry

public static java.rmi.registry.Registry createManagableRegistry(int port)
                                                          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

purge

public void purge()

main

public static void main(java.lang.String[] args)

checkWriteAccess

public static void checkWriteAccess()
                             throws java.rmi.AccessException
Throws:
java.rmi.AccessException

checkReadAccess

public static void checkReadAccess(java.lang.String name)
                            throws java.rmi.AccessException
Throws:
java.rmi.AccessException

allowWriteAll

public void allowWriteAll()
Allow everybody write


forbidWriteAll

public void forbidWriteAll()
Forbid everybody write


addWriteForbidenAddress

public void addWriteForbidenAddress(java.net.InetAddress i)
add a write forbiden address

Parameters:
i -

addWriteAllowAddress

public void addWriteAllowAddress(java.net.InetAddress i)
remove a write forbiden adress

Parameters:
i -

listWriteForbidenAddress

public java.net.InetAddress[] listWriteForbidenAddress()
list write forbiden adress

Returns:

listWriteAllowedAddress

public java.net.InetAddress[] listWriteAllowedAddress()
list write Allowed Adress

Returns:

isWriteAllowAll

public boolean isWriteAllowAll()
is allow for all writer

Returns:

isWriteAllow

public boolean isWriteAllow(java.net.InetAddress i)
Tets if a InetAdress is allow for writting

Parameters:
i -
Returns:

allowReadAll

public void allowReadAll()
Allow everybody read


forbidReadAll

public void forbidReadAll()
Forbid everybody read


addReadForbidenAddress

public void addReadForbidenAddress(java.net.InetAddress i)
add a read forbiden address

Parameters:
i -

addReadAllowAddress

public void addReadAllowAddress(java.net.InetAddress i)
remove a read forbiden adress

Parameters:
i -

listReadForbidenAddress

public java.net.InetAddress[] listReadForbidenAddress()
list read forbiden adress

Returns:

listReadAllowedAddress

public java.net.InetAddress[] listReadAllowedAddress()
list read Allowed Adress

Returns:

isReadAllowAll

public boolean isReadAllowAll()
is read allow for all

Returns:

isReadAllow

public boolean isReadAllow(java.net.InetAddress i)
Tets if a InetAdress is allow to read

Parameters:
i -
Returns: