|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
public interface NameServerRemote
A read-only name service. The name service provides hierarchical object lookup. The path names are separated by '/'.
Because the name service is hierarchical, a lookup of an intermediate node will return a NameServer instance.
The following example is a simple use of the NameServer:
/dir-1/1 - where foo contains the string "foo-1" /dir-1/2 - where foo contains the string "foo-2" /dir-2/1 - where foo contains the string "foo-1" /dir-2/2 - where foo contains the string "foo-2"The root server might have a URL like:
http://www.caucho.com/hessian/hessian/name?ejbid=/So
root.lookup("/dir-1/1")
will return the string
"foo-1", and root.lookup("/dir-1")
will return the
NameServer with the URL:
http://www.caucho.com/hessian/hessian/name?ejbid=/dir-1
方法摘要 | |
---|---|
java.lang.String[] |
list()
Lists all the object name components directly below the current context. |
java.lang.Object |
lookup(java.lang.String name)
Lookup an object from the name server. |
方法详细信息 |
---|
java.lang.Object lookup(java.lang.String name) throws NameServiceException, java.rmi.RemoteException
name
- the relative path name
NameServiceException
- if there's an error
java.rmi.RemoteException
java.lang.String[] list() throws NameServiceException, java.rmi.RemoteException
For example, if the name server context is "/dir-1", the returned values will be ["1", "2"].
NameServiceException
java.rmi.RemoteException
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |