net.larsan.urd.impl
Class ClientContext

java.lang.Object
  |
  +--net.larsan.urd.impl.ClientContext
All Implemented Interfaces:
Context, Namespace

public final class ClientContext
extends java.lang.Object
implements Context

A wrapper for the Urd JNDI context for the services to use. This class checks access to the context using the ContextPermission class before executing any methods.

Services are located using their service box name. And the box will then be asked for the ServiceHandle which is returned.

This class is not synchronized.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
ClientContext(ContextBase context)
           
 
Method Summary
 void bind(java.lang.String url, java.lang.Object object)
          Please refer to the Namespace documenation.
 java.lang.String getNamespaceID()
          Please refer to the Context documenation.
 java.lang.Object lookup(java.lang.String url)
          Please refer to the Namespace documenation.
 void release()
          Close this context.
 java.lang.Object unbind(java.lang.String url)
          Please refer to the Namespace documenation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientContext

public ClientContext(ContextBase context)
Method Detail

getNamespaceID

public java.lang.String getNamespaceID()
Please refer to the Context documenation.

Specified by:
getNamespaceID in interface Context
Returns:
The context name, e.g. its URL mount point

release

public void release()
Close this context.


lookup

public java.lang.Object lookup(java.lang.String url)
Please refer to the Namespace documenation.

Specified by:
lookup in interface Namespace
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)
Please refer to the Namespace documenation.

Specified by:
bind in interface Namespace
Parameters:
url - Norna url address for the object to set
object - Object to set

unbind

public java.lang.Object unbind(java.lang.String url)
Please refer to the Namespace documenation.

Specified by:
unbind in interface Namespace
Parameters:
url - Norna url address for the object to remove
Returns:
The object removed, or null if not found