@Component(value="cuba_ServerInfo") public class ServerInfo extends java.lang.Object implements ServerInfoAPI, AppContext.Listener, org.springframework.core.Ordered
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
configuration |
static java.lang.String |
CUBA_RELEASE_NUMBER_PATH |
static java.lang.String |
CUBA_RELEASE_TIMESTAMP_PATH |
protected GlobalConfig |
globalConfig |
protected java.util.Timer |
infoUpdateTimer |
protected Persistence |
persistence |
protected java.lang.String |
releaseNumber |
protected java.lang.String |
releaseTimestamp |
protected java.lang.String |
serverId |
protected TimeSource |
timeSource |
protected UuidSource |
uuidSource |
NAMEHIGHEST_PLATFORM_PRECEDENCE, LOWEST_PLATFORM_PRECEDENCE| Constructor and Description |
|---|
ServerInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
applicationStarted()
Called by
AppContext after successful application startup and initialization. |
void |
applicationStopped()
Called by
AppContext before application shutdown. |
int |
getOrder() |
java.lang.String |
getReleaseNumber() |
java.lang.String |
getReleaseTimestamp() |
java.lang.String |
getServerId()
This middleware instance identifier (unique in the current cluster).
|
void |
setConfiguration(Configuration configuration) |
protected void |
updateCurrentServer() |
public static final java.lang.String CUBA_RELEASE_NUMBER_PATH
public static final java.lang.String CUBA_RELEASE_TIMESTAMP_PATH
protected java.lang.String releaseNumber
protected java.lang.String releaseTimestamp
protected Configuration configuration
protected volatile java.lang.String serverId
protected GlobalConfig globalConfig
@Inject protected TimeSource timeSource
@Inject protected Persistence persistence
@Inject protected UuidSource uuidSource
protected java.util.Timer infoUpdateTimer
@Inject public void setConfiguration(Configuration configuration)
public java.lang.String getReleaseNumber()
getReleaseNumber in interface ServerInfoAPIpublic java.lang.String getReleaseTimestamp()
getReleaseTimestamp in interface ServerInfoAPIpublic java.lang.String getServerId()
ServerInfoAPIhost:port/context and is built from the following configuration
parameters:
getServerId in interface ServerInfoAPIpublic void applicationStarted()
AppContext.ListenerAppContext after successful application startup and initialization.applicationStarted in interface AppContext.Listenerpublic void applicationStopped()
AppContext.ListenerAppContext before application shutdown.applicationStopped in interface AppContext.Listenerprotected void updateCurrentServer()
public int getOrder()
getOrder in interface org.springframework.core.Ordered