O'Reilly logo

Java RMI by William Grosso

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Context Interface

After all these preliminaries, it’s time to discuss the actual Context interface. Context contains quite a few more methods than the RMI registry does. But, all in all, it should look reasonably familiar. Here’s the entire interface:

public interface Context extends Remote { // Basic binding functionality public void bind(Path path, String name, AttributeSet attributes, Remote server) throws RemoteException, NamingException; public void rebind(Path path, String name, AttributeSet attributes, Remote server) throws RemoteException, NamingException; public void unbind(Path path, String name, AttributeSet attributes) throws RemoteException, NamingException; // Basic querying functionality public Remote lookup(Path path, String name, AttributeSet attributes) throws RemoteException, NamingException; public Remote[] list( ) throws RemoteException, NamingException; public Remote[] list(AttributeSet attributes) throws RemoteException, NamingException; public Remote[] list(String name, AttributeSet attributes) throws RemoteException, NamingException; public Remote[] list(Path path, String name, AttributeSet attributes) throws RemoteException, NamingException; // Context-level API public Context lookupSubContext(Path path, String name) throws RemoteException, NamingException; public ContextList listSubContexts( ) throws RemoteException, NamingException; public ContextList listSubContexts(Path path) throws RemoteException, NamingException; public Context createSubContext(Path ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required