public class JndiUtils extends Object
Constructor and Description |
---|
JndiUtils() |
Modifier and Type | Method and Description |
---|---|
static CompoundName |
bindObjectName(Context context,
ObjectName on) |
static CompoundName |
getCompoundName(ObjectName on)
Return name to use as jndi name.
|
static CompoundName |
getCompoundName(String name) |
static Reference |
getReference(ObjectName on) |
static Context |
getSubContext(CompoundName subContext)
Get subcontext.
|
static Context |
getSubContext(String subContext)
Get subcontext.
|
static void |
main(String[] args)
Testing code.
|
static CompoundName |
unbindObjectName(Context context,
ObjectName on) |
public static CompoundName getCompoundName(String name) throws InvalidNameException
InvalidNameException
public static CompoundName getCompoundName(ObjectName on) throws NullPointerException, InvalidNameException
on
- ObjectName instance to work with.NullPointerException
InvalidNameException
public static Reference getReference(ObjectName on)
on
- ObjectName instance to work with.on
public static Context getSubContext(String subContext) throws NamingException
subContext
- Name of subcontext to return.NamingException
public static Context getSubContext(CompoundName subContext) throws NamingException
subContext
- Name of subcontext to return.NamingException
public static CompoundName bindObjectName(Context context, ObjectName on) throws NamingException, NullPointerException
context
- A subcontext named for the on.getDomain()
(Assumption is that caller already setup this subcontext).on
- The ObjectName we're to base our bind name on.NamingException
NullPointerException
public static CompoundName unbindObjectName(Context context, ObjectName on) throws NullPointerException, NamingException
NullPointerException
NamingException
public static void main(String[] args) throws MalformedObjectNameException, NullPointerException, InvalidNameException, NamingException
args
- Command line arguments.NullPointerException
MalformedObjectNameException
NamingException
InvalidNameException
Copyright © 2003-2014 Internet Archive. All Rights Reserved.