public class NamingServer extends Object implements Naming, NamingEvents, Serializable
Modifier and Type | Field and Description |
---|---|
protected NamingServer |
parent |
protected NamingParser |
parser |
protected Name |
prefix |
protected Map<String,Binding> |
table |
Constructor and Description |
---|
NamingServer() |
NamingServer(Name prefix,
NamingServer parent) |
NamingServer(Name prefix,
NamingServer parent,
EventMgr eventMgr) |
NamingServer(Name prefix,
NamingServer parent,
EventMgr eventMgr,
SecurityManager secMgr) |
Modifier and Type | Method and Description |
---|---|
void |
addNamingListener(EventContext context,
Name target,
int scope,
NamingListener l)
Adds a listener for receiving naming events fired
when the object(s) identified by a target and scope changes.
|
void |
bind(Name name,
Object obj,
String className) |
protected NamingServer |
createNamingServer(Name prefix,
NamingServer parent)
Create sub naming.
|
Context |
createSubcontext(Name name) |
protected Map<String,Binding> |
createTable() |
protected void |
fireEvent(Name fullName,
Binding oldb,
Binding newb,
int type,
String changeInfo) |
Naming |
getRoot() |
Collection<NameClassPair> |
list(Name name) |
Collection<Binding> |
listBindings(Name name) |
Object |
lookup(Name name) |
void |
rebind(Name name,
Object obj,
String className) |
void |
removeNamingListener(NamingListener l)
Removes a listener from receiving naming events
|
boolean |
targetMustExist()
We don't need targets to exist?
|
void |
unbind(Name name) |
protected Name prefix
protected NamingParser parser
protected NamingServer parent
public NamingServer() throws NamingException
NamingException
public NamingServer(Name prefix, NamingServer parent) throws NamingException
NamingException
public NamingServer(Name prefix, NamingServer parent, EventMgr eventMgr) throws NamingException
NamingException
public NamingServer(Name prefix, NamingServer parent, EventMgr eventMgr, SecurityManager secMgr) throws NamingException
NamingException
public void addNamingListener(EventContext context, Name target, int scope, NamingListener l) throws NamingException
NamingEvents
addNamingListener
in interface NamingEvents
context
- - the non-null EventContext the listener is registering withtarget
- A non-null name to be resolved relative to this context.scope
- One of OBJECT_SCOPE, ONELEVEL_SCOPE, or
SUBTREE_SCOPE.l
- The non-null listener.NamingException
- If a problem was encountered while
adding the listener.NamingEvents.removeNamingListener(javax.naming.event.NamingListener)
public void removeNamingListener(NamingListener l) throws NamingException
NamingEvents
removeNamingListener
in interface NamingEvents
l
- non-null listener.NamingException
- If a problem was encountered while
removing the listener.NamingEvents.addNamingListener(javax.naming.event.EventContext, javax.naming.Name, int, javax.naming.event.NamingListener)
public boolean targetMustExist() throws NamingException
targetMustExist
in interface NamingEvents
NamingException
public void bind(Name name, Object obj, String className) throws NamingException
bind
in interface Naming
NamingException
public void rebind(Name name, Object obj, String className) throws NamingException
rebind
in interface Naming
NamingException
public void unbind(Name name) throws NamingException
unbind
in interface Naming
NamingException
public Object lookup(Name name) throws NamingException
lookup
in interface Naming
NamingException
public Collection<NameClassPair> list(Name name) throws NamingException
list
in interface Naming
NamingException
public Collection<Binding> listBindings(Name name) throws NamingException
listBindings
in interface Naming
NamingException
public Context createSubcontext(Name name) throws NamingException
createSubcontext
in interface Naming
NamingException
public Naming getRoot()
protected NamingServer createNamingServer(Name prefix, NamingServer parent) throws NamingException
prefix
- the prefixparent
- the parent naming serverNamingException
- for any errorprotected void fireEvent(Name fullName, Binding oldb, Binding newb, int type, String changeInfo) throws NamingException
NamingException
Copyright © 2020 JBoss by Red Hat. All rights reserved.