hera.server.Server
, hera.server.StateChangeListener<hera.server.ServerStatus>
, java.lang.Runnable
public class WebServer
extends hera.server.ThreadServer
Modifier and Type | Field | Description |
---|---|---|
protected org.springframework.context.ConfigurableApplicationContext |
applicationContext |
|
protected int |
port |
|
protected ProjectFile |
projectFile |
Constructor | Description |
---|---|
WebServer(int port) |
Modifier and Type | Method | Description |
---|---|---|
BuildService |
getBuildService() |
Get build service from server.
|
int |
getPort() |
Get server port.
|
protected void |
initialize() |
|
protected void |
process() |
|
void |
setPort(int port) |
Set server port.
|
protected void |
terminate() |
addServerListener, changeStatus, clearException, fireEvent, getException, getName, getStatus, handleError, isStatus, removeServerListener, stateChanged, waitStatus
protected int port
protected ProjectFile projectFile
protected org.springframework.context.ConfigurableApplicationContext applicationContext
public int getPort()
Return 8080 as default port if not specified.
public BuildService getBuildService()
public void setPort(int port)
Specify negative value if you want default port.
port
- server portprotected void initialize() throws java.lang.Exception
initialize
in class hera.server.AbstractServer
java.lang.Exception
protected void process() throws java.lang.Exception
process
in class hera.server.ThreadServer
java.lang.Exception
protected void terminate()
terminate
in class hera.server.AbstractServer