net.larsan.norna
Interface Namespace

All Known Subinterfaces:
Context, Delegator

public interface Namespace

A namespace is a logical space and adressing system within the Norna frameowrk. A namespace can have objects bound to particular URLs and have the ability to remove and rename those objects. A namespace is always referred to using a full Norna URL including host:

      norna://localhost/
 
A namespace have no upper or lower contraints but encompasses all available addresses within the framework host as defined by one running instance of the framework. E.g.
      norna://webhost/services/mailbox/user/INBOX
 
and
      norna://webhost/service/calculator
 
both resides within the same namespace. Whereas
      norna://mailhost/service/smtp
  
belongs to another namespace. Access to a namespace is performed using Norna Contexts and is subject to security checks. As such the namespace is only a logical component the implementing service providers need not handle directly.

Objects bound to a namespace might be persistent but this is not a requirement of the framework and is left for the framework providers to decide. Thus a service whishing to be compatible over several providers must not asume namespace persistance.

The Norna framework reserves the relative URL "/norna/" including subdirectories for the Norna system services and the service registry. Currently the following addresses are fixed:

Version:
Alpha-0.2 / 2002-10-06 21:37
Author:
Lars J. Nilsson
See Also:
ContextPermission

Method Summary
 void bind(java.lang.String url, java.lang.Object object)
          Put an object into the context space.
 java.lang.Object lookup(java.lang.String url)
          Get an object from the namespace.
 java.lang.Object unbind(java.lang.String url)
          Delete an object form the context space.
 

Method Detail

lookup

public java.lang.Object lookup(java.lang.String url)
Get an object from the namespace. This method will return null if the object or module does not exist, or if the calling thread does not have sufficient priviliges to get the object.

Parameters:
url - Norna url address for the object to get
Returns:
An object from the parameter address, or null if not found

bind

public void bind(java.lang.String url,
                 java.lang.Object object)
Put an object into the context space. This method may throw a SecurityException if the operation is denied. Should any object exist on the place of the URL that object will be deleted.

Parameters:
url - Norna url address for the object to set
object - Object to set

unbind

public java.lang.Object unbind(java.lang.String url)
Delete an object form the context space. This method may throw a SecurityException if the operation is denied.

Parameters:
url - Norna url address for the object to remove
Returns:
The object removed, or null if not found