tyrex.naming
Class MemoryBinding

java.lang.Object
  extended bytyrex.naming.MemoryBinding

public final class MemoryBinding
extends java.lang.Object

Name/value bindings for use inside MemoryContext. This one is never constructed directly but through MemoryContext, MemoryContextFactory and related classes.

Provides heirarchial storage for name/value binding in memory that is exposed through the JNDI context model. Each context (not in the tree) is represented by one instance of MemoryBinding, with each sub-context (child node) or bound value represented by a name/value pair.

This object is thread-safe.

Version:
$Revision: 1.11 $ $Date: 2001/09/17 16:45:09 $
Author:
Assaf Arkin

Field Summary
protected  MemoryBinding _parent
          The parent memory binding.
static int INITIAL_CAPACITY
          The initial capacity for the hashtable.
static float LOAD_FACTOR
          The load factor for the hashtable.
static int MAXIMUM_CAPACITY
          The maximum capacity for the hashtable.
 
Constructor Summary
MemoryBinding()
           
 
Method Summary
(package private)  void debug(java.io.PrintWriter writer)
          Returns an array of all the sub-contexts of this binding.
 void destroy()
          Called when destroying the subcontext and binding associated with it.
protected  javax.naming.NamingEnumeration enumerate(javax.naming.Context context, boolean nameOnly)
           
 java.lang.Object get(java.lang.String name)
           
 javax.naming.Context getContext()
           
 java.lang.String getName()
           
 boolean isEmpty()
           
 boolean isRoot()
           
 void put(java.lang.String name, java.lang.Object value)
           
 java.lang.Object remove(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_CAPACITY

public static final int INITIAL_CAPACITY
The initial capacity for the hashtable.

See Also:
Constant Field Values

MAXIMUM_CAPACITY

public static final int MAXIMUM_CAPACITY
The maximum capacity for the hashtable.

See Also:
Constant Field Values

LOAD_FACTOR

public static final float LOAD_FACTOR
The load factor for the hashtable.

See Also:
Constant Field Values

_parent

protected MemoryBinding _parent
The parent memory binding.

Constructor Detail

MemoryBinding

public MemoryBinding()
Method Detail

getContext

public javax.naming.Context getContext()

get

public java.lang.Object get(java.lang.String name)

put

public void put(java.lang.String name,
                java.lang.Object value)

remove

public java.lang.Object remove(java.lang.String name)

getName

public java.lang.String getName()

isRoot

public boolean isRoot()

isEmpty

public boolean isEmpty()

destroy

public void destroy()
Called when destroying the subcontext and binding associated with it.


debug

void debug(java.io.PrintWriter writer)
Returns an array of all the sub-contexts of this binding.


enumerate

protected javax.naming.NamingEnumeration enumerate(javax.naming.Context context,
                                                   boolean nameOnly)


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.