|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ten60.netkernel.urii.representation.SimpleRepresentationImpl
com.ten60.netkernel.container.ComponentImpl
com.ten60.netkernel.container.Container
public final class Container
Main class for NetKernel. It is responsible for starting and stopping all other components
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CONFIG
default path for system configuration |
static java.lang.String |
NETKERNEL_URN
kernel URN |
static URIdentifier |
URI
our URI |
static java.lang.String |
VERSION
version number |
| Fields inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl |
|---|
mMeta |
| Constructor Summary | |
|---|---|
Container(java.lang.String aBasePath)
Creates a new instance of Container |
|
Container(java.lang.String aBasePath,
java.lang.String aConfig)
|
|
| Method Summary | |
|---|---|
void |
doPeriodicHouseKeeping()
periodic housekeeping involves giving all our system components a chance to do housekeeping |
java.lang.String |
getBasePath()
return the absolute basepath that this container is using |
java.lang.String |
getBasePathURI()
return the absolute basepath URI that this container is using - use this for guaranteed *nix/Win32 platform independence |
java.net.URL |
getBootloaderConfigURL()
returns the URL where the bootloader configuration is being read from |
IComponent |
getComponent(URIdentifier aURI)
return a component with the given URI, null if none is found |
java.lang.String |
getConfigURI()
return the absolute config URI that this container is using |
java.lang.ClassLoader |
getExternalRequestClassLoader()
returns a classloader with access to all classes and resources of the module which holds the internal transport |
java.net.URL |
getKernelSourceURL()
returns the URL where the kernel classes are being loaded from, if they are being loaded from the classpath null is returned. |
java.lang.ThreadGroup |
getRootThreadGroup()
returns the root thread group |
java.lang.String |
getScratchPath()
return the absolute scratch dir path that this container is using |
java.lang.String |
getScratchPathURI()
|
long |
getUptime()
returns the number of milliseconds of uptime |
boolean |
isReady()
returns true if container is fully started and accepting requests |
java.lang.Boolean |
isRestart()
returns true if the outer bootloader should restart rather than terminate when this container terminates |
boolean |
isStarted()
Return true if the container is started |
static void |
main(java.lang.String[] args)
main method to start the component with a given basepath and optional configuration as arguments 1 and 2. |
java.net.URLConnection |
openConnection(java.net.URL u)
|
IURRepresentation |
requestResource(URIdentifier aURI,
java.lang.Class aAspectClass,
java.util.Map aArgs)
API for embedded/JMX to allow requests to be made on the container for resources |
void |
restart(boolean aHot)
restart the container to detect an changed modules without downtime |
void |
start()
Starts the container and wait for restart or stop |
void |
start(Container aContainer)
Starts the container |
void |
stop()
stops the container |
void |
write(java.io.OutputStream aStream)
writes the state of the container out to the given stream as XML |
| Methods inherited from class com.ten60.netkernel.container.ComponentImpl |
|---|
getEncoding, getURI |
| Methods inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl |
|---|
getAspect, getAspects, getMeta, hasAspect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ten60.netkernel.urii.IURRepresentation |
|---|
getAspect, getAspects, getMeta, hasAspect |
| Field Detail |
|---|
public static final URIdentifier URI
public static final java.lang.String DEFAULT_CONFIG
public static final java.lang.String VERSION
public static final java.lang.String NETKERNEL_URN
| Constructor Detail |
|---|
public Container(java.lang.String aBasePath)
aBasePath - basepath (filename) that config path and all paths in config are offset fromaConfig - config path (relative or absolute url) where overriden config can be found- may be null and
default will be used. (etc/system.xml)
public Container(java.lang.String aBasePath,
java.lang.String aConfig)
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public java.lang.Boolean isRestart()
public boolean isReady()
public java.lang.ThreadGroup getRootThreadGroup()
public long getUptime()
public void start(Container aContainer)
throws NetKernelException
start in interface IComponentstart in class ComponentImplaContainer - not used, implemented as part of IComponent
NetKernelException - thrown if we encounter any error during startup
public void start()
throws NetKernelException
NetKernelExceptionpublic boolean isStarted()
public void stop()
throws NetKernelException
stop in interface IComponentstop in class ComponentImplNetKernelException - thrown if we encounter any error during startuppublic void restart(boolean aHot)
public IComponent getComponent(URIdentifier aURI)
public java.lang.String getBasePath()
public java.lang.String getScratchPath()
public java.lang.String getConfigURI()
public java.lang.String getBasePathURI()
public java.lang.String getScratchPathURI()
public void doPeriodicHouseKeeping()
doPeriodicHouseKeeping in interface IComponentdoPeriodicHouseKeeping in class ComponentImpl
public IURRepresentation requestResource(URIdentifier aURI,
java.lang.Class aAspectClass,
java.util.Map aArgs)
throws NetKernelException
aURI - the URI to get the representation foraRepresentationClass - the form that we want the result inaArgs - any arguments to pass through with the request
NetKernelException - thrown if we fail to execute the request for any reason
public java.lang.ClassLoader getExternalRequestClassLoader()
throws NetKernelException
NetKernelException
public java.net.URLConnection openConnection(java.net.URL u)
throws java.io.IOException
java.io.IOException
public void write(java.io.OutputStream aStream)
throws java.io.IOException
write in interface IAspectBinaryStreamwrite in class ComponentImplaStream - the output stream
java.io.IOException - thrown if we fail to write
public java.net.URL getBootloaderConfigURL()
throws java.net.MalformedURLException
java.net.MalformedURLException
public java.net.URL getKernelSourceURL()
throws java.io.IOException
java.io.IOException
|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||