|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.jomc.ri.DefaultLocator
@Generated(value="org.jomc.tools.JavaSources",
comments="See http://jomc.sourceforge.net/jomc/1.0-alpha-1/jomc-tools")
public class DefaultLocator
Default Locator implementation.
The default Locator implementation looks up objects using JNDI.
It supports location URI schemes jndi and jndi+rmi.
| Field Summary | |
|---|---|
private static String |
JNDI_RMI_URI_SCHEME
Constant for the 'jndi+rmi' URI scheme. |
private static String |
JNDI_URI_SCHEME
Constant for the 'jndi' URI scheme. |
private Context |
jndiContext
The JNDI context of the instance. |
private static String[] |
SUPPORTED_URI_SCHEMES
URI schemes supported by this Locator implementation. |
| Constructor Summary | |
|---|---|
DefaultLocator()
Creates a new DefaultLocator instance. |
|
| Method Summary | ||
|---|---|---|
Context |
getJndiContext()
Gets the JNDI context of the instance. |
|
String |
getJndiName(URI location)
Gets the JNDI name for a given location. |
|
private String |
getMessage(String key,
Object args)
|
|
|
getObject(Class<T> specification,
URI location)
|
|
boolean |
isLocationSupported(URI location)
Gets a flag indicating support for a given location URI. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String JNDI_URI_SCHEME
'jndi' URI scheme.
private static final String JNDI_RMI_URI_SCHEME
'jndi+rmi' URI scheme.
private static final String[] SUPPORTED_URI_SCHEMES
Locator implementation.
private Context jndiContext
| Constructor Detail |
|---|
@Generated(value="org.jomc.tools.JavaSources",
comments="See http://jomc.sourceforge.net/jomc/1.0-alpha-1/jomc-tools")
public DefaultLocator()
DefaultLocator instance.
| Method Detail |
|---|
public boolean isLocationSupported(URI location)
location - The location URI to test support for.
true if location is supported by this implementation; false else.
NullPointerException - if location is null.
public Context getJndiContext()
throws NamingException
NamingException - if getting the context fails.public String getJndiName(URI location)
location - The location to get a JNDI name for.
location.
NullPointerException - if location is null.
public <T> T getObject(Class<T> specification,
URI location)
throws IOException
getObject in interface LocatorIOException
private String getMessage(String key,
Object args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||