public class ServerImpl extends Object
Modifier and Type | Field and Description |
---|---|
private ContextManager |
contextManager
A context manager for the factory
operations (new, delete).
|
static String |
LOOSE_COUPLING |
static boolean |
looseCoupling |
private Object |
rootOwnerId
Identifier of the server that owns
the root naming context.
|
private Object |
serverId
Identifier of this server.
|
private UpdateListener |
updateListener
Optional update listener.
|
Constructor and Description |
---|
ServerImpl(Transaction transaction,
Object serverId,
Object rootOwnerId)
Constructs a
ServerImpl |
public static final String LOOSE_COUPLING
public static boolean looseCoupling
private Object serverId
private Object rootOwnerId
private UpdateListener updateListener
null
.private ContextManager contextManager
public ServerImpl(Transaction transaction, Object serverId, Object rootOwnerId)
ServerImpl
transaction
- Transactional context that
provides atomicity for the write operations
performed during a request.serverId
- Identifier of this server.rootOwnerId
- Identifier of the server
that owns the root naming context.public void setUpdateListener(UpdateListener updateListener)
public void bind(CompositeName path, Object obj) throws NamingException
path
- the path of the objectobj
- the object to bindNameAlreadyBoundException
- if the name of
the subcontext is already bound.NameNotFoundException
- if some of the
intermediate names in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NamingException
public void bind(NamingContext nc, String lastName, Object obj, Object ownerId) throws NamingException
NamingException
public void rebind(CompositeName path, Object obj) throws NamingException
path
- the path of the objectobj
- the object to rebindNameNotFoundException
- if some of the
intermediate names in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NamingException
- if the specified path
is bound to a naming context.public void rebind(NamingContext nc, String lastName, Object obj, Object ownerId) throws NamingException
NamingException
public Record lookup(CompositeName path) throws NamingException
path
- the path to look upnull
if the bound object is a context.NameNotFoundException
- if some of the
names (intermediate and final) in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NameNotFoundException
- an error occurs.NamingException
public void unbind(CompositeName path) throws NamingException
path
- the path to unbindNameNotFoundException
- if some of the
intermediate names in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NamingException
- if the specified path
is bound to a naming context.public boolean unbind(NamingContext nc, String lastName, Object ownerId) throws NamingException
NamingException
public NameClassPair[] list(CompositeName path) throws NamingException
NamingException
public Binding[] listBindings(CompositeName path) throws NamingException
NamingException
public void createSubcontext(CompositeName path) throws NamingException
NamingException
public void createSubcontext(CompositeName path, Object subcontextOwnerId) throws NamingException
path
- the path of the subcontextsubcontextOwnerId
- identifier of the owner of
the subcontext (null
if the
owner is the local naming server).NameAlreadyBoundException
- if the name of
the subcontext is already bound.NameNotFoundException
- if some of the
intermediate names in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NamingException
public NamingContextId createSubcontext(NamingContext parentNc, String lastName, CompositeName path, NamingContextId ncid, Object subcontextOwnerId, Object ownerId) throws NamingException
NamingException
public void destroySubcontext(CompositeName path) throws NamingException
path
- the path of the subcontextNameAlreadyBoundException
- if the name of
the subcontext is already bound.NameNotFoundException
- if some of the
intermediate names in the path don't exist.NotOwnerException
- if the owner of the
parent context is checked and is not the local
naming server.NotContextException
- if the specified path
isn't bound to a context.NamingException
public boolean destroySubcontext(NamingContext parentNc, String lastName, CompositeName path, Object ownerId) throws NamingException
NamingException
public NamingContextInfo[] copyNamingContexts(Object serverId) throws NamingException
serverId
- the identifier of the server that owns the naming contexts to get.NamingException
- an exception occurs.public NamingContext getNamingContext(NamingContextId ncid) throws NamingException
NamingException
public NamingContext getNamingContext(CompositeName name) throws NamingException
NamingException
public void storeNamingContext(NamingContext nc) throws NamingException
NamingException
public void addNamingContext(NamingContextInfo ncInfo) throws NamingException
NamingException
public NamingContext newNamingContext(Object ownerId, NamingContextId ncid, CompositeName name) throws NamingException
NamingException
public void changeOwner(CompositeName name, Object newOwnerId) throws NamingException
NamingException
public void resetNamingContext(NamingContext context) throws NamingException
NamingException
Copyright © 2021 ScalAgent D.T.. All rights reserved.