org.mobicents.media.server.mgcp.controller.naming
Class NamingNode<T>

java.lang.Object
  extended by org.mobicents.media.server.mgcp.controller.naming.NamingNode<T>

public class NamingNode<T>
extends Object

The node in the naming tree.

Author:
kulikov

Constructor Summary
NamingNode(Text name, NamingNode parent)
          Create new instance of Naming node
 
Method Summary
 void attach(T attachment)
          Attaches object to this node.
 NamingNode<T> createChild(Text name)
          Creates new child node.
 NamingNode find(Text[] path, int n)
          Gets the node specified by the path
 Text getName()
          Gets the name of this node.
 NamingNode getParent()
          Gets the parent node.
 T poll()
          Gets the object attached to this node.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamingNode

public NamingNode(Text name,
                  NamingNode parent)
Create new instance of Naming node

Parameters:
name - the name of this node.
parent - the parent node.
Method Detail

getName

public Text getName()
Gets the name of this node.

Returns:
the name of the node.

getParent

public NamingNode getParent()
Gets the parent node.

Returns:
parent node.

createChild

public NamingNode<T> createChild(Text name)
Creates new child node.

Parameters:
name - the name of child node to be created
Returns:
created node.

find

public NamingNode find(Text[] path,
                       int n)
Gets the node specified by the path

Parameters:
path - the path to the requested node
n - the length of the path
Returns:
the node if exist or null.

attach

public void attach(T attachment)
Attaches object to this node.

Parameters:
attachment - the object to be attached

poll

public T poll()
Gets the object attached to this node.

Returns:
object attached to this node or null if nothing is attached.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 TeleStax, Inc.. All Rights Reserved.