Top Constructors Methods
org.mortbay.jetty.plus.naming

public Class NamingEntryUtil

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List, javax.naming.Binding, .Context, .InitialContext, .Name, .NameNotFoundException, .NameParser, .NamingEnumeration, .NamingException, org.mortbay.log.Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
bindToENC(Object scope, String
the name to bind as
asName
,
String
the name from the environment to link to asName
mappedName
)

Link a name in a webapp's java:/comp/evn namespace to a pre-existing resource.

private static String
public static Context
public static Context
public static Name
public static Object
lookup(Object scope, String jndiName)

public static List<E>
lookupNamingEntries(Object scope, Class<T>
the type of the entry
clazz
)

Get all NameEntries of a certain type in the given naming environment scope (server-wide names or context-specific names)

private static List<E>
lookupNamingEntries(List<E> list, Context context, Class<T> clazz)

Build up a list of NamingEntry objects that are of a specific type.

public static NamingEntry
lookupNamingEntry(Object scope, String jndiName)

Find a NamingEntry in the given scope.

public static Name
public static Name
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NamingEntryUtilback to summary
public NamingEntryUtil()

Method Detail

bindToENCback to summary
public static boolean bindToENC(Object scope, String asName, String mappedName) throws NamingException

Link a name in a webapp's java:/comp/evn namespace to a pre-existing resource. The pre-existing resource can be either in the webapp's naming environment, or in the container's naming environment. Webapp's environment takes precedence over the server's namespace.

Parameters
asName:String

the name to bind as

mappedName:String

the name from the environment to link to asName

canonicalizeScopeback to summary
private static String canonicalizeScope(Object scope)
getContextForNamingEntriesback to summary
public static Context getContextForNamingEntries(Object scope) throws NamingException
getContextForScopeback to summary
public static Context getContextForScope(Object scope) throws NamingException
getNameForScopeback to summary
public static Name getNameForScope(Object scope)
lookupback to summary
public static Object lookup(Object scope, String jndiName) throws NamingException
lookupNamingEntriesback to summary
public static List<E> lookupNamingEntries(Object scope, Class<T> clazz) throws NamingException

Get all NameEntries of a certain type in the given naming environment scope (server-wide names or context-specific names)

Parameters
clazz:Class<T>

the type of the entry

lookupNamingEntriesback to summary
private static List<E> lookupNamingEntries(List<E> list, Context context, Class<T> clazz) throws NamingException

Build up a list of NamingEntry objects that are of a specific type.

lookupNamingEntryback to summary
public static NamingEntry lookupNamingEntry(Object scope, String jndiName) throws NamingException

Find a NamingEntry in the given scope.

makeNamingEntryNameback to summary
public static Name makeNamingEntryName(NameParser parser, NamingEntry namingEntry) throws NamingException
makeNamingEntryNameback to summary
public static Name makeNamingEntryName(NameParser parser, String jndiName) throws NamingException