net.dpml.station.exec
Class ApplicationHandler
java.lang.Object
net.dpml.station.exec.ApplicationHandler
public class ApplicationHandler
- extends Object
Generic application handler that establishes a dedicated handler based
on the type of resource exposed by a codebase uri.
- Version:
- 1.2.0
- Author:
- Digital Product Meta Library
Constructor Summary |
ApplicationHandler(Logger logger,
String[] args)
The application handler class is a generic component handler that delegates
application deployment processes to dedicated handlers based on the codebase
type of the target application. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApplicationHandler
public ApplicationHandler(Logger logger,
String[] args)
throws Exception
- The application handler class is a generic component handler that delegates
application deployment processes to dedicated handlers based on the codebase
type of the target application. Normally this plugin is activated as a
consequence of invoking the metro commandline handler (which is
the default haviour of the station when deployment local processes).
The following command list help about the metro commandline handler:
$ metro help
Usage:
metro [-uri | -help]
options
-uri Execute deployment of an application codebase.
-key -port
-key (-k) Station callback application key.
-port (-p) Override default RMI registry port selection.
-help Print command help.
A typical example of a commandline and resulting log of an application launch
using metro is show below:
$ metro -uri link:part:dpml/planet/http/dpml-http-demo
[2236 ] [INFO ] (demo): Starting
[2236 ] [INFO ] (org.mortbay.http.HttpServer): Version Jetty/5.1.x
[2236 ] [INFO ] (org.mortbay.util.Container): Started net.dpml.http.impl.HttpServerImpl@6355dc
[2236 ] [INFO ] (org.mortbay.util.Credential): Checking Resource aliases
[2236 ] [INFO ] (org.mortbay.util.Container): Started HttpContext[/,/]
[2236 ] [INFO ] (org.mortbay.http.SocketListener): Started SocketListener on 0.0.0.0:8080
When invoked in conjuction with the station two optional parameters may be
supplied by the station. These include -port option which directs the implementation
to locate the system wide station from an RMI registry on the selected port.
The second option is the -key argument that the handler uses to to resolve a
station callback through which the implementation notifies the station of the process
identity and startup status. The callback process effectivly hands control over
management of the JVM process lietime and root component to to the station.
- Parameters:
logger
- the assigned logging channelargs
- command line arguments
- Throws:
Exception
- if an error occurs