-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINameService.java
More file actions
24 lines (20 loc) · 862 Bytes
/
Copy pathINameService.java
File metadata and controls
24 lines (20 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// CSD 2013, Pablo Galdámez
// This file must be studied when completing activity 3.
//
import java.rmi.*;
import java.rmi.registry.*;
//
// Name Service interface similar to that of RMI (rmiregistry)
//
public interface INameService extends Remote {
// Tries to bind an object to a name. If name was already present,
// throws an "AlreadyBoundException"
public void bind (String name, Remote obj) throws RemoteException,
AlreadyBoundException;
// Similar to sequentially invoke unbind() followed by bind.
public void rebind (String name, Remote obj) throws RemoteException;
// If not found, this method does nothing and does not throw any exception
public void unbind (String name) throws RemoteException;
// Returns the bound object or null of not found.
public Remote resolve (String name) throws RemoteException;
}