Package com.saperion.connector.rmi
Class SaRMIServerInfo
java.lang.Object
com.saperion.connector.rmi.SaRMIServerInfo
Holds the information about the Saperion RMI Server state.
States are e.g.
- running
- stopped
States are e.g.
- running
- stopped
- Author:
- rbo
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSaRMIServerInfo(String serverName, int serverPort, boolean withSSL) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReads the actual server from the list of fail over servers.longintgetLoad()getName()intgetPort()getState()inthashCode()booleanbooleanreadSystemInfo(int threshold) Reads system info.voidrestart()Restart this server.voidSet to overloaded.voidSet running.voidSet to stopped.toString()
-
Constructor Details
-
SaRMIServerInfo
Constructor.- Parameters:
serverName- Server nameserverPort- Server portwithSSL- With SSL
-
-
Method Details
-
getSystemApplication
- Returns:
- System application of this server.
-
restart
public void restart()Restart this server. -
getName
- Returns:
- Name
-
getPort
public int getPort()- Returns:
- Port
-
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
Reads the actual server from the list of fail over servers.- Returns:
- Actual server
-
getFailOvers
- Returns:
- Failover list
-
getConnector
- Returns:
- Own connector
-
readSystemInfo
Reads system info.- Parameters:
threshold- threshold- Returns:
- SystemInfo
-
getSystemInfo
- Returns:
- Last system info
-
getLoad
public int getLoad()- Returns:
- System load in percent
-
equals
-
hashCode
public int hashCode() -
toString
-