|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.larsan.urd.jndi.ContextBase
|
+--net.larsan.urd.jndi.ContextImpl
|
+--net.larsan.urd.impl.Servicebox
The service box 'boxes' an given service from it's archive or folder location. The box is responsible for the service class loader and also acts as the context node for the service.
| Field Summary |
| Fields inherited from class net.larsan.urd.jndi.ContextBase |
ACCESS_PERMISSION, env, handler, localName, nameParser, parent, port, root, ROOT_ADDRESS, ROOT_PORT |
| Fields inherited from interface javax.naming.event.EventContext |
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE |
| Fields inherited from interface javax.naming.Context |
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES |
| Constructor Summary | |
Servicebox(javax.naming.Context parentContext,
java.lang.String localName,
ServiceArchive archive,
Parameters params)
Create service box with a service archive to read from. |
|
| Method Summary | |
void |
destroy()
Destroy servicebox. |
ServiceMetaData |
getMetaData()
Get service meta data. |
java.lang.String |
getNamespaceID()
Get service namspace ID |
Service |
getService()
Get the service instance. |
java.lang.String |
getSourceName()
Get the service source name. |
Status |
getStatus()
Get the reported status of the boxed service. |
void |
kill(DefaultErrorHandler errorHandler)
Stop and unload/destroy service. |
void |
shutdownWarning(long ttl)
Thsi method might be called by the framework before module shutdown. |
void |
start(DefaultErrorHandler errorHandler)
Start service. |
void |
stop(DefaultErrorHandler errorHandler)
Stop service. |
| Methods inherited from class net.larsan.urd.jndi.ContextImpl |
bind, clone, close, composeName, createSubcontext, destroySubcontext, getNameParser, hashCode, list, listBindings, lookup, lookupLink, rebind, rename, toString, unbind |
| Methods inherited from class net.larsan.urd.jndi.ContextBase |
addNamingListener, addNamingListener, addToEnvironment, bind, checkAccess, composeName, createSubcontext, destroySubcontext, findRootContext, getEnvironment, getEventHandler, getNameInNamespace, getNameParser, getParent, list, listBindings, lookup, lookupLink, objectAdded, objectRemoved, objectRenamed, rebind, removeFromEnvironment, removeNamingListener, rename, setHandler, targetMustExist, unbind |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Servicebox(javax.naming.Context parentContext,
java.lang.String localName,
ServiceArchive archive,
Parameters params)
throws javax.naming.NamingException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.io.IOException
parentContext - Service parent JNDI context, must be a ContextBaselocalName - Local context namearchive - Norna archive to read the service from, must not be nullparams - Service parameters, must not be null
javax.naming.NamingException - On context errors
java.lang.InstantiationException - If the service class cannot be created
java.lang.ClassNotFoundException - If the service class is not found in the archive
java.io.IOException - On IO errors| Method Detail |
public java.lang.String getNamespaceID()
public void shutdownWarning(long ttl)
ShutdownListener
shutdownWarning in interface ShutdownListenerttl - Time to live, minimum time in milliseconds until the stop event may occurpublic ServiceMetaData getMetaData()
public Service getService()
public void start(DefaultErrorHandler errorHandler)
errorHandler - Error handler to report errors topublic void stop(DefaultErrorHandler errorHandler)
errorHandler - Error handler to report errors topublic void kill(DefaultErrorHandler errorHandler)
errorHandler - Error handler to report errors topublic java.lang.String getSourceName()
public void destroy()
Any attempt to call a method on a destroyed servicebox will relst in a illegal state exception.
destroy in interface Destroyablepublic Status getStatus()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||