All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface vnet.remote.Host

public interface Host
extends Remote
Interface to represent a machine -a node- in the remote VirtualNet Every server or client, to interact with any other in the virtual net has to be previously 'attached'to a host. Once attached, it is able to do the general operations bind, rebind, unbind and lookup

All the operations needs to have a serverName. This string may be the plain server Name, or a qualified one, specifying the host for the server; in this last case, the format for the string will be :

/name of the virtualNet/HostN/name of the server.

For example, to look for the server "Server" in the Host B of the virtualNet called "ExampleNet", the serverName would be: /ExampleNet/HostB/Server

Version:
0.1, august-1997
Author:
LuisM Pena

Method Index

 o bind(String, Remote)
Binds a server with the serverName specified
 o list(String)
Gives the complete list of servers binded.
 o lookup(String)
Looks the net for a server binded with the serverName specified.
 o rebind(String, Remote)
Rebinds a server with the serverName specified If it would exist other server with the same serverName, it is first unbinded
 o unbind(String)
Unbinds the server that is binded with the serverName specified

Methods

 o bind
 public abstract void bind(String serverName,
                           Remote server) throws AlreadyBoundException, MalformedURLException, UnknownHostException, RemoteException
Binds a server with the serverName specified

Parameters:
serverName - the name for the server (can be qualified)
server - the Remote server
Throws: AlreadyBoundException
if there is already another server binded with the same serverName
Throws: MalformedURLException
if the name is not valid
Throws: UnknownHostException
if the serverName is qualified, and refers to a node that is not accesible from the cuurent Host
Throws: RemoteException
mandatory in any remote object
See Also:
bind
 o rebind
 public abstract void rebind(String serverName,
                             Remote server) throws MalformedURLException, UnknownHostException, RemoteException
Rebinds a server with the serverName specified If it would exist other server with the same serverName, it is first unbinded

Parameters:
serverName - the name for the server (can be qualified)
server - the Remote server
Throws: MalformedURLException
if the name is not valid
Throws: UnknownHostException
if the serverName is qualified, and refers to a node that is not accesible from the cuurent Host
Throws: RemoteException
mandatory in any remote object
See Also:
rebind
 o unbind
 public abstract void unbind(String serverName) throws NotBoundException, MalformedURLException, UnknownHostException, RemoteException
Unbinds the server that is binded with the serverName specified

Parameters:
serverName - the name for the server
serverName - the name for the server
Throws: NotBoundException
if it is not bound such a serverName
Throws: MalformedURLException
if the name is not valid
Throws: UnknownHostException
if the serverName is qualified, and refers to a node that is not accesible from the cuurent Host
Throws: RemoteException
mandatory in any remote object
See Also:
unbind
 o lookup
 public abstract Remote lookup(String serverName) throws NotBoundException, MalformedURLException, UnknownHostException, RemoteException
Looks the net for a server binded with the serverName specified.

Parameters:
serverName - the name of the server
Returns:
a reference to the server (an stub of it)
Throws: NotBoundException
if it is not bound such a serverName
Throws: MalformedURLException
if the name is not valid
Throws: UnknownHostException
if the serverName is qualified, and refers to a node that is not accesible from the cuurent Host
Throws: RemoteException
mandatory in any remote object
See Also:
lookup
 o list
 public abstract String[] list(String name) throws MalformedURLException, UnknownHostException, RemoteException
Gives the complete list of servers binded. The parameter name is here for compatibility with the RMI signature

Parameters:
name - it is not used
Returns:
the list of servers, in the format /VirtualNet/HostX/Name
Throws: MalformedURLException
not possible, only for compatibility with the RMI signature
Throws: UnknownHostException
not possible, only for compatibility with the RMI signature
Throws: RemoteException
mandatory in any remote object

All Packages  Class Hierarchy  This Package  Previous  Next  Index