java rmi Naming








Class java.rmi.Naming





All Packages Class Hierarchy This Package Previous Next Index


Class java.rmi.Naming


java.lang.Object
|
+----java.rmi.Naming



public final class Naming
extends Object

This is the bootstrap mechanism for obtaining references to remote
objects based on Uniform Resource Locator (URL) syntax. The URL
for a remote object is specified using the usual host, port and
name:
rmi://host:port/name
host = host name of registry (defaults to current host)
port = port number of registry (defaults to the registry port number)
name = name for remote object








bind(String, Remote)
Binds the name to the specified remote object.

list(String)
Returns an array of strings of the URLs in the registry.

lookup(String)
Returns the remote object for the URL.

rebind(String, Remote)

Rebind the name to a new object; replaces any existing binding.

unbind(String)
Unbind the name.






lookup

public static Remote lookup(String name) throws NotBoundException, MalformedURLException, UnknownHostException, RemoteException


Returns the remote object for the URL.


Throws: RemoteException
If registry could not be contacted.
Throws: NotBoundException
If name is not currently bound.



bind

public static void bind(String name,
Remote obj) throws AlreadyBoundException, MalformedURLException, UnknownHostException, RemoteException


Binds the name to the specified remote object.


Throws: RemoteException
If registry could not be contacted.
Throws: AlreadyBoundException
If name is already bound.



unbind

public static void unbind(String name) throws RemoteException, NotBoundException, MalformedURLException, UnknownHostException


Unbind the name.


Throws: RemoteException
If registry could not be contacted.
Throws: NotBoundException
If name is not currently bound.



rebind

public static void rebind(String name,
Remote obj) throws RemoteException, MalformedURLException, UnknownHostException


Rebind the name to a new object; replaces any existing binding.


Throws: RemoteException
If registry could not be contacted.



list

public static String[] list(String name) throws RemoteException, MalformedURLException, UnknownHostException


Returns an array of strings of the URLs in the registry.
The array contains a snapshot of the names present in the registry.


Throws: RemoteException
If registry could not be contacted.




All Packages Class Hierarchy This Package Previous Next Index

Submit a bug or feature - Version 1.1.7 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.




Wyszukiwarka

Podobne podstrony:
java rmi server RMISocketFactory
java rmi AccessException
java rmi server Operation
java rmi registry RegistryHandler
java rmi server ObjID
java rmi server RMIFailureHandler
java rmi RMISecurityException
java rmi NotBoundException
java rmi UnknownHostException
java rmi server Skeleton
java rmi server RemoteCall
java rmi dgc Lease
java rmi server RemoteObject
java rmi dgc DGC
java rmi server UnicastRemoteObject
Java RMI Tutorial
java rmi RMISecurityManager
java rmi AlreadyBoundException
java rmi UnexpectedException

więcej podobnych podstron