com.onewebsql.util.jndi
Class FindNamesOp

java.lang.Object
  extended by com.onewebsql.util.jndi.FindNamesOp
All Implemented Interfaces:
JndiOp<Set<Name>>

public class FindNamesOp
extends Object
implements JndiOp<Set<Name>>

This class provides methods for listing object names registered in JNDI context.


Field Summary
static int MAX_DEPTH
          Maximum depth of browsing JNDI context.
 
Constructor Summary
FindNamesOp()
          Constructor with default, maximum JNDI context browsing depth maxDepth.
FindNamesOp(int maxDepth)
          Constructor with provided browsing depth.
 
Method Summary
 Set<Name> findNames(Context ctx, Name parent, int depth)
          Returns all object names found in JNDI context down to provided depth.
 Set<Name> invoke(Context ctx)
          Invokes an operation which needs access to JNDI context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DEPTH

public static final int MAX_DEPTH
Maximum depth of browsing JNDI context. By default 100.

See Also:
Constant Field Values
Constructor Detail

FindNamesOp

public FindNamesOp()
Constructor with default, maximum JNDI context browsing depth maxDepth.


FindNamesOp

public FindNamesOp(int maxDepth)
Constructor with provided browsing depth.

Parameters:
maxDepth - maximum JNDI context browsing depth.
Method Detail

invoke

public Set<Name> invoke(Context ctx)
                 throws NamingException
Description copied from interface: JndiOp
Invokes an operation which needs access to JNDI context.

Specified by:
invoke in interface JndiOp<Set<Name>>
Parameters:
ctx - JNDI context
Returns:
result of the operation
Throws:
NamingException - when an error happens

findNames

public Set<Name> findNames(Context ctx,
                           Name parent,
                           int depth)
                    throws NamingException
Returns all object names found in JNDI context down to provided depth.

Parameters:
ctx - JNDI context.
parent - parent object name in JNDI context.
depth - browsing depth.
Returns:
set of names found in JNDI context.
Throws:
NamingException - in case of JNDI error.


Copyright © 2011-2013 e-point SA. All Rights Reserved.