|
ADK CVS | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface contains useful constants for manipulating the JNDI
context used by the ADK, and address agent based on these bindings.
To get the initial ARE context an agent has to call
ExecutionEnvironment.getJNDIContext().
Contexts created this way are associated with the agent that
created it. This means that the JNDI names can contain local
references such as LOCAL_HABITAT. The agent does have
to get a new fresh
ADK JNDI Context from the ExecutionEnvironment after
every move for this to work reliable, but since the returned
context is not Serializable anyway that is required
anyway when using the ADK JNDI context from an agent.
Non-agent code can create an ARE JNDI context by initializing the
JNDI InitialContext environment with the value of the
constant INITIAL_CONTEXT_FACTORY as follows:
Hashtable environment = new Hashtable();
environment.add(Context.INITIAL_CONTEXT_FACTORY,
NamingConstant.INITIAL_CONTEXT_FACTORY);
Context context = InitialContext(environment);
Note that you need to make sure that all runtime classes are
included in the context class loader (which happens automatically
when you use the are-startup.jar to launch your application or
service). In general the following construct will work:
Thread thread = Thread.currentThread();
ClassLoader currentCl = thread.getContextClassLoader();
try {
thread.setContextClassLoader(this.getClass().getClassLoader());
jndi = new InitialContext(environment);
} finally {
thread.setContextClassLoader(currentCl);
}
XXX How about setting/having the habitat-id ?!?
The ADK JNDI context contains at least one subcontext, the
ROOT_CONTEXT. This root context contains all habitats
known to the current habitat. Your current local habitat can be found as
a subcontext called LOCAL_HABITAT (or directly as
context by CURRENT_HABITAT_CONTEXT).
There are three generic type of constants in this class. These are described below by the last part of the name of the variable:
_CONTEXTThe contants ending with
_CONTEXT are
meant to be used when manipulating JNDI directly.
_PATHThe contants ending with
_PATH are meant
for using with AddressURIs. These correspond with their
_CONTEXT counterpart.
_SA, _SPACEand others are the basic elements used to construct the particular context and names.
AddressURI,
ExecutionEnvironment.getJNDIContext(),
InitialContext| Field Summary | |
static java.lang.String |
AGENT_STATISTICS_SA
The name of the Agent Statistics System Agent. |
static java.lang.String |
AGENT_STATISTICS_SA_PATH
The path to the Tryllian Agent Statistics System Agent context. |
static java.lang.String |
AGENTS_CONTEXT
The full name of the system agents part of the tryllian namespace. |
static java.lang.String |
AGENTS_PATH
The base path to the Tryllian Agents context. |
static java.lang.String |
AGENTS_SPACE
The name of the agents namespace, where canonical agent names are bound. |
static java.lang.String |
ALL_HABITATS_CONTEXT
The full name of union of all habitats |
static java.lang.String |
ALL_HABITATS_NAMES_CONTEXT
The full name of union of all names of all habitats namespace. |
static java.lang.String |
CURRENT_HABITAT_CONTEXT
The full name of the current local habitat. |
static java.lang.String |
ECHO_SA
The name of the Echo System Agent. |
static java.lang.String |
ECHO_SA_PATH
The path to the Tryllian Echo System Agent context. |
static java.lang.String |
FILETRANSFER_SA
The name of the file transfer system agent |
static java.lang.String |
FILETRANSFER_SA_PATH
The path to the Tryllian Filetransfer System Agent context. |
static java.lang.String |
GLOBAL_HABITAT
Symbolic link to the global habitat. |
static java.lang.String |
GROUPS_CONTEXT
The full name of the groups context. |
static java.lang.String |
GROUPS_PATH
The base path for the groups context. |
static java.lang.String |
GROUPS_SPACE
The name of the groups namespace. |
static java.lang.String |
HABITAT_NAMES_CONTEXT
The full name of the namespace with all nnames of the local habitat. |
static java.lang.String |
HABITAT_NAMES_SPACE
The name of the habitat-names namespace |
static java.lang.String |
HABITAT_SA
The name of the Habitat System Agent. |
static java.lang.String |
HABITAT_SA_PATH
The path to the Tryllian Habitat System Agent context. |
static java.lang.String |
INITIAL_CONTEXT_FACTORY
The name of the factory class to use for the Context.INITIAL_CONTEXT_FACTORY environment property. |
static java.lang.String |
JNDI_SA
The name of the JNDI System Agent. |
static java.lang.String |
JNDI_SA_PATH
The path to the Tryllian JNDI System Agent context. |
static java.lang.String |
LOCAL_HABITAT
Symbolic link to the local habitat. |
static java.lang.String |
MESSAGE_BROKER_SA
The name of the Message Broker System Agent. |
static java.lang.String |
MESSAGE_BROKER_SA_PATH
The path to the Tryllian Message Broker System Agent context. |
static java.lang.String |
PROPERTIES_SA
The name of the Properties System Agent. |
static java.lang.String |
PROPERTIES_SA_PATH
The path to the Tryllian Properties System Agent context. |
static java.lang.String |
ROOT_CONTEXT
The root context of the ADK. |
static java.lang.String |
ROOT_SPACE
The name of the root namespace. |
static java.lang.String |
SEP
The character used to separate JNDI name components. |
static java.lang.String |
SERVICES_CONTEXT
The full name of the service agents part of the tryllian namespace. |
static java.lang.String |
SERVICES_PATH
The base path to the Tryllian Services context. |
static java.lang.String |
SERVICES_SPACE
The name of the services namespace. |
static java.lang.String |
STATISTICS_SA
The name of the Statistics System Agent. |
static java.lang.String |
STATISTICS_SA_PATH
The path to the Tryllian Statistics System Agent context. |
static java.lang.String |
SYSTEM_AGENTS_CONTEXT
The full name of the system agents part of the tryllian namespace. |
static java.lang.String |
SYSTEM_AGENTS_PATH
The base path to the Tryllian System Agents context. |
static java.lang.String |
SYSTEM_AGENTS_SPACE
The name of the system agents namespace. |
static java.lang.String |
TRANSPORTER_SA
The name of the Transporter System Agent. |
static java.lang.String |
TRANSPORTER_SA_PATH
The path to the Tryllian Transporter System Agent context. |
static java.lang.String |
TRYLLIAN_CONTEXT
The full name of the tryllian part of the namespace |
static java.lang.String |
TRYLLIAN_PATH
The base path to the Tryllian context. |
static java.lang.String |
TRYLLIAN_SPACE
The name of the Tryllian namespace. |
static java.lang.String |
USER_CONTEXT
The full name of the user part of the namespace. |
static java.lang.String |
USER_PATH
The base path to the User context. |
static java.lang.String |
USER_SPACE
The name of the user namespace. |
static java.lang.String |
WAKEUP_SA
The name of the WakeUp System Agent. |
static java.lang.String |
WAKEUP_SA_PATH
The path to the Tryllian WakeUp System Agent context. |
| Field Detail |
public static final java.lang.String INITIAL_CONTEXT_FACTORY
public static final java.lang.String SEP
public static final java.lang.String LOCAL_HABITAT
public static final java.lang.String GLOBAL_HABITAT
public static final java.lang.String TRYLLIAN_SPACE
public static final java.lang.String USER_SPACE
public static final java.lang.String ROOT_SPACE
public static final java.lang.String SERVICES_SPACE
public static final java.lang.String SYSTEM_AGENTS_SPACE
public static final java.lang.String AGENTS_SPACE
public static final java.lang.String HABITAT_NAMES_SPACE
public static final java.lang.String GROUPS_SPACE
public static final java.lang.String ROOT_CONTEXT
It is defined as ROOT_SPACE + SEP.
public static final java.lang.String CURRENT_HABITAT_CONTEXT
It is defined as ROOT_CONTEXT + LOCAL_HABITAT + SEP.
public static final java.lang.String ALL_HABITATS_CONTEXT
It is defined as
ROOT_CONTEXT + GLOBAL_HABITAT + SEP.
public static final java.lang.String TRYLLIAN_CONTEXT
It is defined as
CURRENT_HABITAT_CONTEXT + TRYLLIAN_SPACE + SEP.
public static final java.lang.String TRYLLIAN_PATH
It is defined as
TRYLLIAN_SPACE + SEP
public static final java.lang.String USER_CONTEXT
It is defined as
CURRENT_HABITAT_CONTEXT + USER_SPACE + SEP.
public static final java.lang.String USER_PATH
It is defined as
USER_SPACE + SEP
public static final java.lang.String SYSTEM_AGENTS_CONTEXT
It is defined as
TRYLLIAN_CONTEXT + SYSTEM_AGENTS_SPACE + SEP.
public static final java.lang.String SYSTEM_AGENTS_PATH
It is defined as
TRYLLIAN_PATH + SYSTEM_AGENTS_SPACE + SEP
public static final java.lang.String AGENTS_CONTEXT
It is defined as
TRYLLIAN_CONTEXT + SEP + AGENTS_SPACE + SEP.
public static final java.lang.String HABITAT_NAMES_CONTEXT
It is defined as
CURRENT_HABITAT_CONTEXT + TRYLLIAN_SPACE + SEP
+ HABITAT_NAMES_SPACE + SEP;.
public static final java.lang.String ALL_HABITATS_NAMES_CONTEXT
It is defined as
ALL_HABITATS_CONTEXT + TRYLLIAN_SPACE + SEP
+ HABITAT_NAMES_SPACE + SEP;.
public static final java.lang.String AGENTS_PATH
It is defined as
TRYLLIAN_PATH + AGENTS_SPACE + SEP
public static final java.lang.String SERVICES_CONTEXT
It is defined as
CURRENT_HABITAT_CONTEXT + SERVICES_SPACE + SEP.
public static final java.lang.String SERVICES_PATH
It is defined as
SERVICES_SPACE + SEP
public static final java.lang.String GROUPS_CONTEXT
USER_CONTEXT + GROUPS_SPACE + SEP
public static final java.lang.String GROUPS_PATH
GROUPS_SPACE + SEP
public static final java.lang.String HABITAT_SA
public static final java.lang.String HABITAT_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + HABITAT_SA
public static final java.lang.String ECHO_SA
public static final java.lang.String ECHO_SA_PATH
It is defined as
TRYLLIAN_PATH + SYSTEM_AGENTS_PATH + SEP
public static final java.lang.String FILETRANSFER_SA
public static final java.lang.String FILETRANSFER_SA_PATH
It is defined as
TRYLLIAN_PATH + SYSTEM_AGENTS_PATH + SEP
public static final java.lang.String AGENT_STATISTICS_SA
public static final java.lang.String AGENT_STATISTICS_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + AGENT_STATISTICS_SA
public static final java.lang.String MESSAGE_BROKER_SA
public static final java.lang.String MESSAGE_BROKER_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + MESSAGE_BROKER_SA
public static final java.lang.String PROPERTIES_SA
public static final java.lang.String PROPERTIES_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + PROPERTIES_SA
public static final java.lang.String STATISTICS_SA
public static final java.lang.String STATISTICS_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + STATISTICS_SA
public static final java.lang.String TRANSPORTER_SA
public static final java.lang.String TRANSPORTER_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + TRANSPORTER_SA
public static final java.lang.String WAKEUP_SA
public static final java.lang.String WAKEUP_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + WAKEUP_SA
public static final java.lang.String JNDI_SA
public static final java.lang.String JNDI_SA_PATH
It is defined as
SYSTEM_AGENTS_PATH + JNDI_SA
|
Copyright 2005, Tryllian Solutions B.V. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||