com.distinct.rpc
Class NetDB
java.lang.Object
|
+--com.distinct.rpc.NetDB
- public class NetDB
- extends java.lang.Object
Database for RPC service names.
- See Also:
RPCEntry
|
Constructor Summary |
NetDB(java.io.File file)
Creates a new RPC service name database and initializes it
from a local file. |
NetDB(java.net.URL url)
Creates a new RPC service name database and initializes it
from a URL. |
|
Method Summary |
RPCEntry |
getrpcbyname(java.lang.String name)
Returns an RPCEntry describing the service identified by a given name. |
RPCEntry |
getrpcbynumber(int number)
Returns an RPCEntry describing the service identified by a given number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetDB
public NetDB(java.io.File file)
throws java.io.IOException
- Creates a new RPC service name database and initializes it
from a local file. The file has the format of the UNIX "rpc"
file.
- Parameters:
file - The file that is used for initialization.
NetDB
public NetDB(java.net.URL url)
throws java.io.IOException
- Creates a new RPC service name database and initializes it
from a URL. The content of the URL has the format of the UNIX "rpc"
file.
- Parameters:
url - The URL that is used for initialization.
getrpcbynumber
public RPCEntry getrpcbynumber(int number)
- Returns an RPCEntry describing the service identified by a given number.
- Parameters:
number - The number of the requested RPC service.- Returns:
- The RPCEntry describing the service identified by the given number (null if no info is avaliable).
getrpcbyname
public RPCEntry getrpcbyname(java.lang.String name)
- Returns an RPCEntry describing the service identified by a given name.
- Parameters:
name - The name of the requested RPC service.- Returns:
- The RPCEntry describing the service identified by the given name (null if no info is avaliable).