public class ServiceRegistrationInMemoryImpl extends Object implements ServiceRegistration
| Modifier and Type | Field and Description |
|---|---|
protected String |
host
Host that is running the service
|
protected boolean |
isActive
True if this service is active
|
protected boolean |
isInMaintenanceMode
True if this service in in maintenance mode
|
protected boolean |
isJobProducer
True if this service produces jobs
|
protected boolean |
isOnline
True if this service is online
|
protected String |
path
Path to the service
|
protected JobProducer |
service
The service instance
|
protected String |
serviceType
Service type
|
| Constructor and Description |
|---|
ServiceRegistrationInMemoryImpl(JobProducer service,
String host)
Creates a new service registration.
|
ServiceRegistrationInMemoryImpl(String type,
String host,
String path,
boolean jobProducer)
Creates a new service registration.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
JobProducer |
getService()
Returns the actual service instance.
|
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
|
boolean |
isActive() |
boolean |
isInMaintenanceMode()
Whether the service is in maintenance mode.
|
boolean |
isJobProducer() |
boolean |
isOnline() |
void |
setMaintenance(boolean maintenance)
Sets the service's maintenance mode.
|
String |
toString() |
protected String serviceType
protected String host
protected String path
protected JobProducer service
protected boolean isJobProducer
protected boolean isActive
protected boolean isOnline
protected boolean isInMaintenanceMode
public ServiceRegistrationInMemoryImpl(String type, String host, String path, boolean jobProducer)
type - the service typehost - the service hostpath - the path to the servicejobProducer - true if the service is a job producerpublic ServiceRegistrationInMemoryImpl(JobProducer service, String host)
service - the local service instancehost - the host that the service is running onpublic String getServiceType()
getServiceType in interface ServiceRegistrationServiceRegistration.getServiceType()public String getHost()
getHost in interface ServiceRegistrationServiceRegistration.getHost()public String getPath()
getPath in interface ServiceRegistrationServiceRegistration.getPath()public boolean isJobProducer()
isJobProducer in interface ServiceRegistrationServiceRegistration.isJobProducer()public boolean isActive()
isActive in interface ServiceRegistrationServiceRegistration.isActive()public boolean isOnline()
isOnline in interface ServiceRegistrationServiceRegistration.isOnline()public boolean isInMaintenanceMode()
isInMaintenanceMode in interface ServiceRegistrationServiceRegistration.isInMaintenanceMode()public void setMaintenance(boolean maintenance)
maintenance - true if the service is in maintenance modepublic JobProducer getService()
public Date getOnlineFrom()
getOnlineFrom in interface ServiceRegistrationServiceRegistration.getOnlineFrom()public ServiceState getServiceState()
ServiceRegistrationgetServiceState in interface ServiceRegistrationpublic Date getStateChanged()
ServiceRegistrationgetStateChanged in interface ServiceRegistrationpublic int getErrorStateTrigger()
ServiceRegistrationgetErrorStateTrigger in interface ServiceRegistrationpublic int getWarningStateTrigger()
ServiceRegistrationgetWarningStateTrigger in interface ServiceRegistrationCopyright © 2009–2021 Opencast Project. All rights reserved.