|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.client.ClientContainer
public final class ClientContainer
Defines the class use for the client container This class analyze the ear or the jar client and launch the client.
Field Summary | |
---|---|
private java.util.List<java.lang.String> |
appArgs
Extra Arguments. |
private java.lang.String[] |
args
Arguments used by the client. |
private java.lang.String |
classpath
Classpath for the application client. |
private static java.lang.String |
DEFAULT_FOLDER
Folder to create in tmp folder. |
private java.net.URL[] |
extensionsURLs
URLs resolved in the case of the extension mechanism in the Ear case. |
private JLog |
logger
Logger. |
private java.lang.String |
mainClass
Main class to use to launch the application client. |
private java.lang.String |
tmpDir
Temporary directory. |
Constructor Summary | |
---|---|
private |
ClientContainer(java.lang.String[] args)
Constructor for a Client container. |
Method Summary | |
---|---|
private void |
analyzeArgs()
Analyze arguments and extract parameters for the client container. |
private void |
error(java.lang.String s)
Display an error message with the logger. |
private java.io.File |
extractAndAnalyzeEar(java.io.File earFile)
Extract the client of an ear and analyze ear too. |
private java.net.URL[] |
getUserClasspathUrls()
Gets the URL of user classpath (can be empty). |
private void |
info(java.lang.String s)
Display an info message with the logger. |
private void |
invokeClient()
Start the client on its main class with the thread class loader. |
static void |
main(java.lang.String[] args)
Main method of the Client container. |
private void |
start()
Start the client container. |
private void |
usage()
Print the usage of this client. |
private void |
warn(java.lang.String s)
Display a warn message with the logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String DEFAULT_FOLDER
private java.lang.String mainClass
private java.lang.String tmpDir
private java.lang.String classpath
private java.lang.String[] args
private java.util.List<java.lang.String> appArgs
private java.net.URL[] extensionsURLs
private JLog logger
Constructor Detail |
---|
private ClientContainer(java.lang.String[] args)
args
- the arguments of the instance of the client containerMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- the arguments of the client containerprivate void start() throws java.lang.Exception
java.lang.Exception
- if it failsprivate void invokeClient() throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
- if class is not found
java.lang.NoSuchMethodException
- if method (main) is not found
java.lang.IllegalAccessException
- if access is illegal
java.lang.reflect.InvocationTargetException
- if invocation failedprivate void analyzeArgs() throws java.lang.Exception
java.lang.Exception
- if there is an error when analyzing argumentsprivate void usage()
private java.io.File extractAndAnalyzeEar(java.io.File earFile) throws java.lang.Exception
earFile
- ear to be analyzed
java.lang.Exception
- if the analyze and/or extract failsprivate java.net.URL[] getUserClasspathUrls()
private void info(java.lang.String s)
s
- the messageprivate void error(java.lang.String s)
s
- the messageprivate void warn(java.lang.String s)
s
- the message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |