public class Resin
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Management |
_management |
static int |
EXIT_OK |
Constructor and Description |
---|
Resin(ResinArgs args)
Creates a new resin server.
|
Resin(java.lang.String[] args)
Creates a new resin server.
|
Modifier and Type | Method and Description |
---|---|
void |
addStartInfoListener(StartInfoListener listener) |
void |
close()
Called from the embedded server
|
void |
configureFile(Path path) |
void |
configureProgram(ConfigProgram program) |
LogSystem |
createLogSystem() |
Management |
createResinManagement() |
ServletService |
createServer() |
StatSystem |
createStatSystem() |
void |
destroy() |
ResinAdmin |
getAdmin() |
Broker |
getAdminBroker()
Returns the admin broker
|
EnvironmentClassLoader |
getClassLoader()
Returns the classLoader
|
java.lang.String |
getClusterSystemKey() |
Path |
getConfDirectory() |
double |
getCpuLoad() |
static Resin |
getCurrent()
Returns the resin server.
|
static java.lang.String |
getCurrentServerId() |
java.lang.String |
getDisplayServerId()
Returns the server id.
|
java.lang.String |
getDynamicDisplayAddress() |
java.lang.String |
getDynamicServerAddress() |
int |
getDynamicServerPort() |
java.lang.String |
getHomeCluster()
Returns the cluster to join for a dynamic cluster join.
|
java.util.Date |
getInitialStartTime()
Returns the initial start time.
|
LicenseCheck |
getLicenseCheck() |
Path |
getLicenseDirectory() |
protected java.lang.String |
getLicenseErrorMessage() |
protected java.lang.String |
getLicenseMessage() |
LicenseStore |
getLicenseStore() |
LifecycleState |
getLifecycleState()
Returns the current lifecycle state.
|
Path |
getLogDirectory() |
Management |
getManagement()
Returns the management api.
|
Path |
getResinConf()
The configuration file used to start the server.
|
Path |
getResinDataDirectory()
Returns the resin-data directory
|
Path |
getResinHome()
Returns resin.home.
|
protected java.lang.String |
getResinName() |
ResinSystem |
getResinSystem() |
java.lang.String |
getRestartMessage() |
Path |
getRootDirectory()
Gets the root directory.
|
CloudServer |
getSelfServer() |
ServletService |
getServer()
Returns the active server.
|
java.lang.String |
getServerAddress() |
protected Path |
getServerDataDirectory() |
java.lang.String |
getServerId()
Returns the server id.
|
java.lang.String |
getServerIdFilePart() |
int |
getServerPort() |
ServletContainerConfig |
getServletContainerConfig() |
long |
getShutdownWaitMax() |
java.lang.String |
getStage()
Returns the server stage.
|
java.util.Date |
getStartTime()
Returns the start time.
|
java.lang.String |
getUniqueServerName()
Sets the server id.
|
void |
initMain()
Initialize the server, binding to TCP and starting the threads.
|
boolean |
isActive()
Returns true if active.
|
boolean |
isClosed()
Returns true if the server is closed.
|
boolean |
isClosing()
Returns true if the server is closing.
|
boolean |
isElasticServer() |
boolean |
isEmbedded() |
boolean |
isProfessional()
Set true for Resin pro.
|
boolean |
isResinServer()
Returns true for a Resin server, false for a watchdog.
|
boolean |
isRestart() |
boolean |
isWatchdog() |
protected boolean |
loadCloudLicenses() |
static void |
main(java.lang.String[] argv)
The main start of the web server.
|
void |
setIgnoreLock(boolean isIgnoreLock) |
void |
setLicenseDirectory(Path licenseDirectory) |
void |
setRootDirectory(Path path) |
void |
setShutdownWaitTime(long shutdownTime) |
void |
start()
Starts the server.
|
void |
stop()
Starts the server.
|
java.lang.String |
toString() |
void |
waitForExit()
Thread to wait until Resin should be stopped.
|
public static final int EXIT_OK
protected Management _management
public Resin(java.lang.String[] args)
public Resin(ResinArgs args)
public void setIgnoreLock(boolean isIgnoreLock)
_isIgnoreLock
- public static Resin getCurrent()
public ResinSystem getResinSystem()
public EnvironmentClassLoader getClassLoader()
public java.lang.String getServerId()
public java.lang.String getServerIdFilePart()
public java.lang.String getUniqueServerName()
public java.lang.String getDisplayServerId()
public static java.lang.String getCurrentServerId()
public boolean isResinServer()
public boolean isWatchdog()
public Path getResinConf()
public Path getConfDirectory()
protected java.lang.String getResinName()
public Path getResinHome()
public boolean isProfessional()
public boolean isEmbedded()
public Path getRootDirectory()
public void setRootDirectory(Path path)
public Path getLicenseDirectory()
public void setLicenseDirectory(Path licenseDirectory)
public java.lang.String getHomeCluster()
public boolean isElasticServer()
public java.lang.String getClusterSystemKey()
public java.lang.String getStage()
public java.lang.String getServerAddress()
public java.lang.String getDynamicServerAddress()
public java.lang.String getDynamicDisplayAddress()
public int getServerPort()
public int getDynamicServerPort()
public Path getLogDirectory()
public Path getResinDataDirectory()
protected Path getServerDataDirectory()
public long getShutdownWaitMax()
public void setShutdownWaitTime(long shutdownTime)
public Management createResinManagement()
public StatSystem createStatSystem()
public LogSystem createLogSystem()
public java.util.Date getInitialStartTime()
public java.util.Date getStartTime()
public LifecycleState getLifecycleState()
public ServletService getServer()
public Management getManagement()
public CloudServer getSelfServer()
public ServletService createServer()
public boolean isActive()
public boolean isClosing()
public boolean isClosed()
public void addStartInfoListener(StartInfoListener listener)
public boolean isRestart()
public java.lang.String getRestartMessage()
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public void destroy()
public ResinAdmin getAdmin()
public void initMain() throws java.lang.Throwable
java.lang.Throwable
public void configureFile(Path path)
public void configureProgram(ConfigProgram program)
public LicenseStore getLicenseStore()
public LicenseCheck getLicenseCheck()
protected boolean loadCloudLicenses()
public Broker getAdminBroker()
protected java.lang.String getLicenseMessage()
protected java.lang.String getLicenseErrorMessage()
public ServletContainerConfig getServletContainerConfig()
public double getCpuLoad()
public void waitForExit() throws java.io.IOException
java.io.IOException
public void close()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
-conf resin.xml : alternate configuration file -port port : set the server's portt