Package com.saperion.connector.rmi
Class SaRMIServerInfo
- java.lang.Object
-
- com.saperion.connector.rmi.SaRMIServerInfo
-
public class SaRMIServerInfo extends java.lang.ObjectHolds the information about the Saperion RMI Server state.
States are e.g.
- running
- stopped- Author:
- rbo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSaRMIServerInfo.ServerStateServer state.
-
Constructor Summary
Constructors Constructor Description SaRMIServerInfo(java.lang.String serverName, int serverPort, boolean withSSL)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)SaRMIServerInfogetActualServer()Reads the actual server from the list of fail over servers.SaRMISystemConnectorgetConnector()java.util.List<SaRMIServerInfo>getFailOvers()longgetLastOverload()intgetLoad()java.lang.StringgetName()intgetPort()SaRMIServerInfo.ServerStategetState()SaRMISystemConnectorgetSystemApplication()SaSystemInfogetSystemInfo()inthashCode()booleanisFailOverServer()booleanisWithSsl()SaSystemInforeadSystemInfo(int threshold)Reads system info.voidrestart()Restart this server.voidsetOverload()Set to overloaded.voidsetRunning()Set running.voidsetStopped()Set to stopped.java.lang.StringtoString()
-
-
-
Method Detail
-
getSystemApplication
public SaRMISystemConnector getSystemApplication()
- Returns:
- System application of this server.
-
restart
public void restart()
Restart this server.
-
getName
public java.lang.String getName()
- Returns:
- Name
-
getPort
public int getPort()
- Returns:
- Port
-
getState
public SaRMIServerInfo.ServerState getState()
- Returns:
- Server state
-
isFailOverServer
public boolean isFailOverServer()
- Returns:
- Is fail over server
-
isWithSsl
public boolean isWithSsl()
- Returns:
- true, if is with ssl
-
setRunning
public void setRunning()
Set running.
-
setOverload
public void setOverload()
Set to overloaded.
-
setStopped
public void setStopped()
Set to stopped.
-
getLastOverload
public long getLastOverload()
- Returns:
- Last overload time
-
getActualServer
public SaRMIServerInfo getActualServer()
Reads the actual server from the list of fail over servers.- Returns:
- Actual server
-
getFailOvers
public java.util.List<SaRMIServerInfo> getFailOvers()
- Returns:
- Failover list
-
getConnector
public SaRMISystemConnector getConnector()
- Returns:
- Own connector
-
readSystemInfo
public SaSystemInfo readSystemInfo(int threshold)
Reads system info.- Parameters:
threshold- threshold- Returns:
- SystemInfo
-
getSystemInfo
public SaSystemInfo getSystemInfo()
- Returns:
- Last system info
-
getLoad
public int getLoad()
- Returns:
- System load in percent
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-