org.planx.xmlstore
Interface NameServer

All Known Implementing Classes:
GlobalNameServer, LocalNameServer

public interface NameServer

Author:
Henning Niss

Method Summary
 void bind(String name, Reference ref)
          Bind the name to the value reference in the name server.
 Reference lookup(String name)
          Lookup the name in the name server.
 void rebind(String name, Reference oldRef, Reference newRef)
          Rebind the name to the value reference in the name server if the name is currently bound to the specified value reference.
 

Method Detail

lookup

Reference lookup(String name)
                 throws IOException
Lookup the name in the name server. The method will return null if the name is not currently bound.

Parameters:
name - the name to be looked up
Returns:
the reference bound to the name, or null if the name is not currently bound
Throws:
IOException

bind

void bind(String name,
          Reference ref)
          throws IOException,
                 NameAlreadyBoundException
Bind the name to the value reference in the name server.

Parameters:
name - the name to be bound
ref - the reference to bind it to
Throws:
NameAlreadyBoundException - if the name is already bound (to a different value reference).
IOException

rebind

void rebind(String name,
            Reference oldRef,
            Reference newRef)
            throws IOException,
                   StaleReferenceException
Rebind the name to the value reference in the name server if the name is currently bound to the specified value reference.

Parameters:
name - the name to be bound
oldRef - the reference to which name is currently bound
newRef - the reference to bind it to
Throws:
StaleReferenceException - if the name is bound to something different from oldRef.
IOException


Copyright © 2010. All Rights Reserved.