Class ServiceRegistrationJpaImpl
java.lang.Object
org.opencastproject.serviceregistry.impl.jpa.ServiceRegistrationJpaImpl
- All Implemented Interfaces:
org.opencastproject.serviceregistry.api.ServiceRegistration
@Entity(name="ServiceRegistration")
public class ServiceRegistrationJpaImpl
extends Object
implements org.opencastproject.serviceregistry.api.ServiceRegistration
A record of a service that creates and manages receipts.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new service registration which is onlineServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path) Creates a new service registration which is onlineServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path, boolean jobProducer) Creates a new service registration which is online and not in maintenance mode. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetHost()Gets the associatedHostRegistrationJpaImplgetId()Gets the primary key for this service registration.getPath()org.opencastproject.serviceregistry.api.ServiceStateintinthashCode()booleanisActive()booleanbooleanbooleanisOnline()voidpostLoad()voidsetActive(boolean isActive) voidsetErrorStateTrigger(int errorStateTrigger) voidsetHostRegistration(HostRegistrationJpaImpl hostRegistration) voidSets the primary key identifier.voidsetJobProducer(boolean isJobProducer) voidsetOnline(boolean online) voidsetOnlineFrom(Date onlineFrom) voidvoidsetServiceState(org.opencastproject.serviceregistry.api.ServiceState serviceState) voidsetServiceState(org.opencastproject.serviceregistry.api.ServiceState state, int triggerJobSignature) voidsetStateChanged(Date stateChanged) voidsetWarningStateTrigger(int warningStateTrigger) toString()
-
Constructor Details
-
ServiceRegistrationJpaImpl
public ServiceRegistrationJpaImpl()Creates a new service registration which is online -
ServiceRegistrationJpaImpl
public ServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path) Creates a new service registration which is online- Parameters:
hostRegistration- the host registrationserviceType- the type of job this service handlespath- the URL path on this host to the service endpoint
-
ServiceRegistrationJpaImpl
public ServiceRegistrationJpaImpl(HostRegistrationJpaImpl hostRegistration, String serviceType, String path, boolean jobProducer) Creates a new service registration which is online and not in maintenance mode.- Parameters:
hostRegistration- the host registrationserviceType- the type of job this service handlespath- the URL path on this host to the service endpointjobProducer-
-
-
Method Details
-
getId
Gets the primary key for this service registration.- Returns:
- the primary key
-
setId
Sets the primary key identifier.- Parameters:
id- the identifier
-
getOnlineFrom
- Specified by:
getOnlineFromin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setOnlineFrom
-
getServiceType
- Specified by:
getServiceTypein interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
getPath
- Specified by:
getPathin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setPath
-
getServiceState
public org.opencastproject.serviceregistry.api.ServiceState getServiceState()- Specified by:
getServiceStatein interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setServiceState
public void setServiceState(org.opencastproject.serviceregistry.api.ServiceState serviceState) -
setServiceState
public void setServiceState(org.opencastproject.serviceregistry.api.ServiceState state, int triggerJobSignature) -
getStateChanged
- Specified by:
getStateChangedin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setStateChanged
-
getWarningStateTrigger
public int getWarningStateTrigger()- Specified by:
getWarningStateTriggerin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setWarningStateTrigger
public void setWarningStateTrigger(int warningStateTrigger) -
getErrorStateTrigger
public int getErrorStateTrigger()- Specified by:
getErrorStateTriggerin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setErrorStateTrigger
public void setErrorStateTrigger(int errorStateTrigger) -
isActive
public boolean isActive()- Specified by:
isActivein interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setActive
public void setActive(boolean isActive) -
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setOnline
public void setOnline(boolean online) -
isJobProducer
public boolean isJobProducer()- Specified by:
isJobProducerin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
setJobProducer
public void setJobProducer(boolean isJobProducer) -
isInMaintenanceMode
public boolean isInMaintenanceMode()- Specified by:
isInMaintenanceModein interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
getHost
- Specified by:
getHostin interfaceorg.opencastproject.serviceregistry.api.ServiceRegistration
-
getHostRegistration
Gets the associatedHostRegistrationJpaImpl- Returns:
- the host registration
-
setHostRegistration
- Parameters:
hostRegistration- the hostRegistration to set
-
postLoad
public void postLoad() -
hashCode
public int hashCode() -
equals
-
toString
-