public class ServiceRegistrationManagerImpl extends Object implements ServiceRegistrationManager
The simplest way to use of the service registration manager is to declare the following in your bean definition file:
<template:instance name="serviceRegistrationManager" t:name="myServiceRegistrationManager" t:service="myService" t:endpoint="myServiceEndpoint" t:jobScheduler="jobScheduler"/>
The ServiceRegistrationManager requires periodic ticks from a quartz job scheduler (the 'jobScheduler' bean in the above example)
See the ValidatingServiceRegistrationManagerImpl class for a special implementation which performs automatic service profile validation.
ValidatingServiceRegistrationManagerImpl
Modifier and Type | Class and Description |
---|---|
static class |
ServiceRegistrationManagerImpl.State
registration manager states.
|
Constructor and Description |
---|
ServiceRegistrationManagerImpl() |
Modifier and Type | Method and Description |
---|---|
Endpoint |
getEndpoint() |
String |
getProfileId() |
ServiceRegistrator |
getRegistrator() |
Object |
getService()
returns the registered service
|
UniqueServiceLocator |
getServiceLocator() |
OpaqueResource |
getServiceProfile()
returns the service profile associated with the service.
|
ServiceRegistrationManagerImpl.State |
getState() |
boolean |
isDisabled() |
boolean |
isSchemaUpdate() |
void |
registerSchema()
register service schema.
|
void |
registerService()
ensure the service is registered.
|
void |
setDisabled(boolean disabled)
set to true if we want to disable service registration.
|
void |
setEndpoint(Endpoint endpoint)
service endpoint.
|
void |
setProfileId(String profileId) |
void |
setRegistrator(ServiceRegistrator registrator) |
void |
setSchemaUpdate(boolean schemaUpdate) |
void |
setService(Object service)
service to register.
|
void |
setServiceLocator(UniqueServiceLocator serviceLocator) |
void |
setServiceProfile(OpaqueResource serviceProfile) |
void |
setState(ServiceRegistrationManagerImpl.State state) |
void |
tick()
called periodically to advance the state machine.
|
public void registerService()
public void registerSchema()
public OpaqueResource getServiceProfile()
getServiceProfile
in interface ServiceRegistrationManager
ServiceRegistrationManager.getServiceProfile()
public void tick()
public void setProfileId(String profileId)
public String getProfileId()
public Object getService()
ServiceRegistrationManager
getService
in interface ServiceRegistrationManager
public void setService(Object service)
ServiceRegistrationManager
setService
in interface ServiceRegistrationManager
service
- service instancepublic Endpoint getEndpoint()
public void setEndpoint(Endpoint endpoint)
ServiceRegistrationManager
setEndpoint
in interface ServiceRegistrationManager
endpoint
- service endpointpublic ServiceRegistrator getRegistrator()
public void setRegistrator(ServiceRegistrator registrator)
public void setServiceProfile(OpaqueResource serviceProfile)
public ServiceRegistrationManagerImpl.State getState()
public void setState(ServiceRegistrationManagerImpl.State state)
public boolean isSchemaUpdate()
public void setSchemaUpdate(boolean schemaUpdate)
public boolean isDisabled()
public void setDisabled(boolean disabled)
ServiceRegistrationManager
setDisabled
in interface ServiceRegistrationManager
public UniqueServiceLocator getServiceLocator()
public void setServiceLocator(UniqueServiceLocator serviceLocator)
Copyright © 2019. All rights reserved.