Package com.saperion.connector.rmi
Class SaRMIServerInfo
- java.lang.Object
-
- com.saperion.connector.rmi.SaRMIServerInfo
-
public class SaRMIServerInfo extends java.lang.Object
Holds 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 class
SaRMIServerInfo.ServerState
Server 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 boolean
equals(java.lang.Object obj)
SaRMIServerInfo
getActualServer()
Reads the actual server from the list of fail over servers.SaRMISystemConnector
getConnector()
java.util.List<SaRMIServerInfo>
getFailOvers()
long
getLastOverload()
int
getLoad()
java.lang.String
getName()
int
getPort()
SaRMIServerInfo.ServerState
getState()
SaRMISystemConnector
getSystemApplication()
SaSystemInfo
getSystemInfo()
int
hashCode()
boolean
isFailOverServer()
boolean
isWithSsl()
SaSystemInfo
readSystemInfo(int threshold)
Reads system info.void
restart()
Restart this server.void
setOverload()
Set to overloaded.void
setRunning()
Set running.void
setStopped()
Set to stopped.java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-