|
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
Main class for NetKernel. It is responsible for starting and stopping all other components
Field Summary | |
static String |
DEFAULT_CONFIG
default path for system configuration |
static String |
NETKERNEL_URN
kernel URN |
static URIdentifier |
URI
our URI |
static String |
VERSION
version number |
Fields inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl |
mMeta |
Constructor Summary | |
Container(String aBasePath)
Creates a new instance of Container |
|
Container(String aBasePath,
String aConfig)
|
Method Summary | |
void |
doPeriodicHouseKeeping()
periodic housekeeping involves giving all our system components a chance to do housekeeping |
String |
getBasePath()
return the absolute basepath that this container is using |
String |
getBasePathURI()
return the absolute basepath URI that this container is using - use this for guaranteed *nix/Win32 platform independence |
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 |
String |
getConfigURI()
return the absolute config URI that this container is using |
ClassLoader |
getExternalRequestClassLoader()
returns a classloader with access to all classes and resources of the module which holds the internal transport |
URL |
getKernelSourceURL()
returns the URL where the kernel classes are being loaded from, if they are being loaded from the classpath null is returned. |
ThreadGroup |
getRootThreadGroup()
returns the root thread group |
String |
getScratchPath()
return the absolute scratch dir path that this container is using |
String |
getScratchPathURI()
|
long |
getUptime()
returns the number of milliseconds of uptime |
boolean |
isReady()
returns true if container is fully started and accepting requests |
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(String[] args)
main method to start the component with a given basepath and optional configuration as arguments 1 and 2. |
URLConnection |
openConnection(URL u)
|
IURRepresentation |
requestResource(URIdentifier aURI,
Class aAspectClass,
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(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 String DEFAULT_CONFIG
public static final String VERSION
public static final String NETKERNEL_URN
Constructor Detail |
public Container(String aBasePath)
aBasePath
- basepath (filename) that config path and all paths in config are offset frompublic Container(String aBasePath, String aConfig)
Method Detail |
public static void main(String[] args)
public Boolean isRestart()
public boolean isReady()
public ThreadGroup getRootThreadGroup()
public long getUptime()
public void start(Container aContainer) throws NetKernelException
start
in interface IComponent
start
in class ComponentImpl
aContainer
- not used, implemented as part of IComponent
NetKernelException
public void start() throws NetKernelException
NetKernelException
public boolean isStarted()
public void stop() throws NetKernelException
stop
in interface IComponent
stop
in class ComponentImpl
NetKernelException
public void restart(boolean aHot)
public IComponent getComponent(URIdentifier aURI)
public String getBasePath()
public String getScratchPath()
public String getConfigURI()
public String getBasePathURI()
public String getScratchPathURI()
public void doPeriodicHouseKeeping()
doPeriodicHouseKeeping
in interface IComponent
doPeriodicHouseKeeping
in class ComponentImpl
public IURRepresentation requestResource(URIdentifier aURI, Class aAspectClass, Map aArgs) throws NetKernelException
aURI
- the URI to get the representation foraArgs
- any arguments to pass through with the request
NetKernelException
- thrown if we fail to execute the request for any reasonpublic ClassLoader getExternalRequestClassLoader() throws NetKernelException
NetKernelException
public URLConnection openConnection(URL u) throws IOException
IOException
public void write(OutputStream aStream) throws IOException
write
in interface IAspectBinaryStream
write
in class ComponentImpl
IOException
public URL getBootloaderConfigURL() throws MalformedURLException
MalformedURLException
public URL getKernelSourceURL() throws IOException
IOException
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |