public class JaxbServiceRegistration extends Object implements ServiceRegistration
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active |
protected int |
errorStateTrigger |
protected String |
host |
protected boolean |
jobProducer |
protected boolean |
maintenanceMode |
protected boolean |
online |
protected Date |
onlineFrom
The last time the service has been declared online
|
protected String |
path |
protected ServiceState |
serviceState |
protected String |
serviceType |
protected Date |
stateChanged |
protected int |
warningStateTrigger |
| Constructor and Description |
|---|
JaxbServiceRegistration()
Creates a new service registration which is online and not in maintenance mode.
|
JaxbServiceRegistration(ServiceRegistration serviceRegistration)
Creates a new JAXB annotated service registration based on an existing service registration
|
JaxbServiceRegistration(String serviceType,
String host,
String path)
Creates a new service registration which is online and not in maintenance mode.
|
JaxbServiceRegistration(String serviceType,
String host,
String path,
boolean jobProducer)
Creates a new service registration which is online and not in maintenance mode.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getErrorStateTrigger()
Gets the job signature which changed last time the service state to error.
|
String |
getHost() |
Date |
getOnlineFrom()
Gets the last time the service has been declared online
|
String |
getPath() |
ServiceState |
getServiceState()
Gets the current state of the service
|
String |
getServiceType() |
Date |
getStateChanged()
Gets the last date when state was changed
|
int |
getWarningStateTrigger()
Gets the job signature which changed last time the service state to warning
|
int |
hashCode() |
boolean |
isActive() |
boolean |
isInMaintenanceMode()
Whether the service is in maintenance mode.
|
boolean |
isJobProducer() |
boolean |
isOnline() |
void |
setActive(boolean active) |
void |
setErrorStateTrigger(int jobSignature)
Sets the job which triggered the last error state
|
void |
setHost(String host) |
void |
setInMaintenanceMode(boolean maintenanceMode)
Sets the maintenance status of this service registration
|
void |
setJobProducer(boolean jobProducer)
Sets whether this service registration is a job producer.
|
void |
setOnline(boolean online)
Sets the online status of this service registration
|
void |
setOnlineFrom(Date onlineFrom)
Sets the last time the service has been declared online
|
void |
setPath(String path) |
void |
setServiceState(ServiceState state)
Sets the current state of the service.
|
void |
setServiceState(ServiceState state,
int triggerJobSignature)
Sets the current state of the service and the trigger Job.
|
void |
setServiceType(String serviceType) |
void |
setStateChanged(Date stateChanged)
Sets the last date when the state was changed
|
void |
setWarningStateTrigger(int jobSignature)
Sets the job which triggered the last warning state
|
String |
toString() |
protected String serviceType
protected String host
protected String path
protected boolean active
protected boolean online
protected boolean maintenanceMode
protected boolean jobProducer
protected Date onlineFrom
protected ServiceState serviceState
protected Date stateChanged
protected int errorStateTrigger
protected int warningStateTrigger
public JaxbServiceRegistration()
public JaxbServiceRegistration(ServiceRegistration serviceRegistration)
serviceRegistration - public JaxbServiceRegistration(String serviceType, String host, String path)
host - the hostserviceType - the job typepublic String getHost()
getHost in interface ServiceRegistrationServiceRegistration.getHost()public void setHost(String host)
host - the host to setpublic String getServiceType()
getServiceType in interface ServiceRegistrationServiceRegistration.getServiceType()public void setServiceType(String serviceType)
serviceType - the serviceType to setpublic boolean isInMaintenanceMode()
isInMaintenanceMode in interface ServiceRegistrationServiceRegistration.isInMaintenanceMode()public void setInMaintenanceMode(boolean maintenanceMode)
maintenanceMode - public boolean isActive()
isActive in interface ServiceRegistrationServiceRegistration.isActive()public void setActive(boolean active)
public boolean isOnline()
isOnline in interface ServiceRegistrationServiceRegistration.isOnline()public void setOnline(boolean online)
online - public String getPath()
getPath in interface ServiceRegistrationServiceRegistration.getPath()public void setPath(String path)
path - the path to setpublic boolean isJobProducer()
isJobProducer in interface ServiceRegistrationServiceRegistration.isJobProducer()public void setJobProducer(boolean jobProducer)
jobProducer - the jobProducer to setpublic Date getOnlineFrom()
getOnlineFrom in interface ServiceRegistrationServiceRegistration.getOnlineFrom()public void setOnlineFrom(Date onlineFrom)
onlineFrom - the onlineFrom to setpublic ServiceState getServiceState()
getServiceState in interface ServiceRegistrationServiceRegistration.getServiceState()public void setServiceState(ServiceState state)
state - current statepublic void setServiceState(ServiceState state, int triggerJobSignature)
ServiceState.WARNING or
ServiceState.ERROR the triggered job will be set.state - the service statetriggerJobSignature - the triggered job signaturepublic Date getStateChanged()
getStateChanged in interface ServiceRegistrationServiceRegistration.getStateChanged()public void setStateChanged(Date stateChanged)
stateChanged - last datepublic int getErrorStateTrigger()
getErrorStateTrigger in interface ServiceRegistrationServiceRegistration.getErrorStateTrigger()public void setErrorStateTrigger(int jobSignature)
jobSignature - the jobpublic int getWarningStateTrigger()
getWarningStateTrigger in interface ServiceRegistrationServiceRegistration.getWarningStateTrigger()public void setWarningStateTrigger(int jobSignature)
jobSignature - the jobpublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()Copyright © 2009–2020 Opencast Project. All rights reserved.