|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.jbossas.servermanager.Server
public class Server
A Server.
Field Summary | |
---|---|
static String |
DEPLOYER_NAME
ObjectName of the Main Deployer |
static String |
JBOSS_SERVER_CONFIG_DIR_NAME
the directory where server config instances live |
static String |
JBOSS_SERVER_DEPLOY_DIR_NAME
the hot deployment directory |
Constructor Summary | |
---|---|
Server()
|
Method Summary | |
---|---|
void |
addArg(Argument arg)
Add an argument. |
void |
addJvmArg(Argument arg)
Add a jvm arg. |
void |
addSysProperty(Property property)
Add a system property. |
void |
deploy(File file)
Deploy a package with the main deployer. |
void |
doShutdown()
Send server shutdown command. |
String |
getArgs()
Get the arguments as a string for the command line. |
protected File |
getConfDir()
The server's directory (ie, all, default) |
String |
getConfig()
Get the config. |
File |
getDumpFile()
Where should the servers's trace dump go? |
File |
getErrorLog()
Where should the server's std err log go? |
PrintWriter |
getErrorWriter()
The error log's writer. |
String |
getHost()
Get the host. |
Integer |
getHttpPort()
Get the httpPort. |
URL |
getHttpUrl()
Where is the HTTP service listening? |
String |
getInitialContextFactoryClassName()
Get the InitialContext factory class name |
String |
getJvmArgs()
Get the JVM args for the command line. |
File |
getLogDir()
The server's log directory |
String |
getLoggingProperty()
Get the logging property to pass to the server JBAS-6630 - default to DEBUG |
String |
getLogThreshold()
Get the Log Level |
String |
getName()
Get the name. |
Context |
getNamingContext()
Get the Naming Context. |
File |
getOutputLog()
Where should the servers's std out go? |
PrintWriter |
getOutWriter()
The writer for the output log. |
String |
getPartition()
Get the HA partition name of the Server |
String |
getPassword()
Get password to pass to org.jboss.Shutdown using the -p option. |
Process |
getProcess()
Get the process. |
Integer |
getRmiPort()
Get the rmiPort |
String |
getRmiUrl()
The URl for the RMI listener. |
MBeanServerConnection |
getServerConnection()
Get server connection. |
String |
getServerUrl()
Get the URL to connect server |
String |
getSysProperties()
Get the system properties for the command line. |
String |
getSysProperty(String key)
Get a single system property. |
String |
getUsername()
Get username to pass to org.jboss.Shutdown using the -u option. |
boolean |
hasWebServer()
Get the hasWebServer. |
Object |
invoke(MBeanServerConnection server,
ObjectName name,
String method,
Object[] args,
String[] sig)
|
Object |
invoke(ObjectName name,
String method,
Object[] args,
String[] sig)
invoke wraps an invoke call to the mbean server in a lot of exception unwrapping. |
boolean |
isRunning()
Is the server actually running? |
boolean |
isStopped()
Has the server been intentionally stopped? |
String |
listThreadDump()
Get server thread dump. |
void |
redeploy(File file)
|
void |
setConfig(String config)
Set the config. |
void |
setErrorWriter(PrintWriter errorlog)
Set the error writer. |
void |
setHasWebServer(boolean hasWebServer)
Set the hasWebServer. |
void |
setHost(String host)
Set the host. |
void |
setHttpPort(Integer httpPort)
Set the httpPort. |
void |
setInitialContextFactoryClassName(String initialContextFactoryClassName)
Set the InitialContext factory class name |
void |
setLogThreshold(String logThreshold)
Set the Log Level |
protected void |
setManager(ServerManager manager)
Set the manager. |
void |
setName(String name)
Set the name. |
void |
setNamingContext(Context namingContext)
Set the NamingContext |
void |
setOutWriter(PrintWriter outlog)
Set the output log's writer |
void |
setPartition(String partition)
Set the HA partition name of the Server same as -g in run.sh so set before start-up |
void |
setPassword(String password)
Set password to pass to org.jboss.Shutdown using the -p option. |
void |
setProcess(Process process)
The running process of this server. |
void |
setRmiPort(Integer rmiPort)
Set the rmiPort. |
void |
setServerConnection(MBeanServerConnection serverConnection)
Set server connection. |
void |
setServerUrl(String serverUrl)
Set the URL to connect server |
void |
setUsername(String username)
Set username to pass to org.jboss.Shutdown using the -u option. |
void |
undeploy(File file)
Undeploy a package with the main deployer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JBOSS_SERVER_CONFIG_DIR_NAME
public static final String JBOSS_SERVER_DEPLOY_DIR_NAME
public static final String DEPLOYER_NAME
Constructor Detail |
---|
public Server()
Method Detail |
---|
public String getName()
public void setName(String name)
name
- The name to set.public String getUsername()
public void setUsername(String username)
username
- the server jmx usernamepublic String getPassword()
public void setPassword(String password)
password
- the server jmx passwordpublic String getPartition()
public void setPartition(String partition)
partition
- the HA partition name to useprotected void setManager(ServerManager manager)
manager
- public void addArg(Argument arg)
arg
- public String getArgs()
public void addJvmArg(Argument arg)
arg
- public String getJvmArgs()
public void addSysProperty(Property property)
property
- public String getSysProperty(String key)
public String getSysProperties()
public String getLoggingProperty()
public void setProcess(Process process)
process
- public boolean isRunning()
public boolean isStopped()
public Process getProcess()
public URL getHttpUrl() throws MalformedURLException
MalformedURLException
- for a malformed urlpublic String getRmiUrl()
public String getConfig()
public void setConfig(String config)
config
- The config to set.public String getHost()
public void setHost(String host)
host
- The host to set.public Integer getHttpPort()
public void setHttpPort(Integer httpPort)
httpPort
- The httpPort to set.public void setRmiPort(Integer rmiPort)
rmiPort
- The rmiPort to set.public Integer getRmiPort()
public File getErrorLog()
public File getOutputLog()
public File getDumpFile()
public File getLogDir()
protected File getConfDir()
public void setOutWriter(PrintWriter outlog)
outlog
- the log writerpublic PrintWriter getOutWriter()
public PrintWriter getErrorWriter()
public void setErrorWriter(PrintWriter errorlog)
errorlog
- public boolean hasWebServer()
public void setHasWebServer(boolean hasWebServer)
hasWebServer
- The hasWebServer to set.public Context getNamingContext() throws NamingException
NamingException
public void setNamingContext(Context namingContext)
namingContext
- public MBeanServerConnection getServerConnection() throws NamingException
NamingException
public void setServerConnection(MBeanServerConnection serverConnection)
serverConnection
- public String listThreadDump() throws NamingException, InstanceNotFoundException, MBeanException, ReflectionException, IOException
NamingException
- for contect lookup
InstanceNotFoundException
- MBeanServerConnection method invoke()
MBeanException
- MBeanServerConnection method invoke()
ReflectionException
- MBeanServerConnection method invoke()
IOException
- MBeanServerConnection method invoke()public void doShutdown() throws NamingException, InstanceNotFoundException, MBeanException, ReflectionException, IOException
NamingException
- for context lookup
InstanceNotFoundException
- MBeanServerConnection method invoke()
MBeanException
- MBeanServerConnection method invoke()
ReflectionException
- MBeanServerConnection method invoke()
IOException
- MBeanServerConnection method invoke()public String getServerUrl()
public void setServerUrl(String serverUrl)
serverUrl
- public String getInitialContextFactoryClassName()
public void setInitialContextFactoryClassName(String initialContextFactoryClassName)
initialContextFactoryClassName
- public String getLogThreshold()
public void setLogThreshold(String logThreshold)
logThreshold
- log levelpublic void deploy(File file) throws Exception
name
- filename/url of package to deploy.
Exception
- Description of Exceptionpublic void redeploy(File file) throws Exception
Exception
public void undeploy(File file) throws Exception
name
- filename/url of package to undeploy.
Exception
- Description of Exceptionpublic Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
name
- ObjectName of the mbean to be calledmethod
- mbean method to be calledargs
- Object[] of arguments for the mbean method.sig
- String[] of types for the mbean methods parameters.
Exception
- Description of Exceptionpublic Object invoke(MBeanServerConnection server, ObjectName name, String method, Object[] args, String[] sig) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |