public interface IServer extends IComponent
Modifier and Type | Interface and Description |
---|---|
static class |
IServer.ServerType |
Modifier and Type | Field and Description |
---|---|
static String |
LISTENER_NAME_HTTP |
static String |
LISTENER_NAME_HTTPS |
static String |
PORTAL_PFX |
static String |
PROP_HOST |
static String |
PROP_HTTP_HOST |
static String |
PROP_HTTP_PORT |
static String |
PROP_HTTPS_HOST |
static String |
PROP_HTTPS_PORT |
static String |
PROP_IS_MAINTENANCE_MODE |
static String |
PROP_IS_MAINTENANCE_TEMPORARY |
static String |
PROP_MAINTENANCE_REASON |
static String |
PROP_PORT |
static String |
PROP_REMOTESERVERS |
static String |
PROP_ROLES |
static String |
PROP_SERVER_NAME |
static String |
PROP_URL |
static String |
SERVER_TYPE_KEY |
Modifier and Type | Method and Description |
---|---|
boolean |
addRole(String roleName)
Adds role to the server.
|
boolean |
getActive() |
String[] |
getAssignedRoles()
Returns all currently assigned roles to this server
|
IClusterProvider |
getClusterProvider() |
String |
getHttpHost() |
int |
getHttpPort() |
String |
getHttpsHost() |
int |
getHttpsPort() |
String |
getMaintenanceReason()
Returns the reason (if specified) of why this cluster node
is in maintenance mode.
|
ISegment |
getPrimarySegment()
Deprecated.
|
Collection<IClusterRole> |
getRoles()
Deprecated.
|
Collection<IClusterRole> |
getRoles(String segmentName)
Deprecated.
|
Collection<ISegment> |
getSegments()
Deprecated.
|
String |
getServerName()
Returns server name
|
IServer |
getStartupVersion()
Copy of server properties loaded at startup
They do not reflect any changes since then.
|
default IServer.ServerType |
getType() |
boolean |
hasRole(String roleName)
Return true if the server has a given role.
|
boolean |
isActive(boolean forceCheck)
Returns whether the system things this cluster node is online.
|
boolean |
isMaintenanceMode()
Returns whether this cluster node is in maintenance mode
|
boolean |
isMaintenanceTemporary()
Returns whether this cluster node is in temporary maintenance mode
|
boolean |
removeRole(String roleName)
Removes roles from the server.
|
void |
setActive(boolean active) |
void |
setAssignedRoles(String[] assignedRoles)
Assigns new set of roles to this server
|
void |
setHttpHost(String host) |
void |
setHttpPort(int port) |
void |
setHttpsHost(String host) |
void |
setHttpsPort(int port) |
void |
setMaintenanceMode(boolean isMaintenanceMode)
This is equivalent to
setMaintenanceMode(boolean, String, boolean) where reason is null and
isTemporary is true. |
void |
setMaintenanceMode(boolean isMaintenanceMode,
String reason,
boolean isTemporary)
Sets whether this cluster node is in maintenance mode
|
void |
setServerName(String serverName)
Sets new server name
|
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
static final String SERVER_TYPE_KEY
static final String PORTAL_PFX
static final String PROP_SERVER_NAME
static final String PROP_ROLES
static final String PROP_URL
static final String LISTENER_NAME_HTTP
static final String LISTENER_NAME_HTTPS
static final String PROP_HOST
static final String PROP_PORT
static final String PROP_REMOTESERVERS
static final String PROP_IS_MAINTENANCE_MODE
static final String PROP_IS_MAINTENANCE_TEMPORARY
static final String PROP_MAINTENANCE_REASON
static final String PROP_HTTP_HOST
static final String PROP_HTTP_PORT
static final String PROP_HTTPS_HOST
static final String PROP_HTTPS_PORT
String getHttpHost()
int getHttpPort()
String getHttpsHost()
int getHttpsPort()
IServer getStartupVersion()
IClusterProvider getClusterProvider()
boolean hasRole(String roleName)
roleName
- role to testboolean addRole(String roleName) throws PortalException
roleName
- new rolePortalException
boolean removeRole(String roleName) throws PortalException
roleName
- role to removePortalException
String[] getAssignedRoles()
void setAssignedRoles(String[] assignedRoles) throws PortalException
assignedRoles
- new set of rolesPortalException
String getServerName()
void setServerName(String serverName) throws PortalException
serverName
- new namePortalException
void setHttpHost(String host) throws PortalException
PortalException
void setHttpPort(int port) throws PortalException
PortalException
void setHttpsHost(String host) throws PortalException
PortalException
void setHttpsPort(int port) throws PortalException
PortalException
@Deprecated Collection<ISegment> getSegments()
IClusterProvider.getSegment()
ISegment
@Deprecated ISegment getPrimarySegment()
IClusterProvider.getSegment()
@Deprecated Collection<IClusterRole> getRoles()
@Deprecated Collection<IClusterRole> getRoles(String segmentName)
getRoles()
segmentName
- void setActive(boolean active)
boolean getActive()
default IServer.ServerType getType()
boolean isActive(boolean forceCheck)
forceCheck
- true to bypass any cached information and re-check with a new pingvoid setMaintenanceMode(boolean isMaintenanceMode) throws PortalException
setMaintenanceMode(boolean, String, boolean)
where reason is null and
isTemporary is true.isMaintenanceMode
- true if in maintenance mode, false otherwisePortalException
void setMaintenanceMode(boolean isMaintenanceMode, String reason, boolean isTemporary) throws PortalException
isMaintenanceMode
- true if in maintenance mode, false otherwisereason
- (optional) Text shown to users with the reason for the maintenance. If null, a generic message is usedisTemporary
- if true, the maintenance mode will turn off the next time MWS restarts, if false it will stay in maintenance mode after a restart.PortalException
boolean isMaintenanceMode()
String getMaintenanceReason()
boolean isMaintenanceTemporary()