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 ServiceRegistrationManagerServiceRegistrationManager.getServiceProfile()public void tick()
public void setProfileId(String profileId)
public String getProfileId()
public Object getService()
ServiceRegistrationManagergetService in interface ServiceRegistrationManagerpublic void setService(Object service)
ServiceRegistrationManagersetService in interface ServiceRegistrationManagerservice - service instancepublic Endpoint getEndpoint()
public void setEndpoint(Endpoint endpoint)
ServiceRegistrationManagersetEndpoint in interface ServiceRegistrationManagerendpoint - 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)
ServiceRegistrationManagersetDisabled in interface ServiceRegistrationManagerpublic UniqueServiceLocator getServiceLocator()
public void setServiceLocator(UniqueServiceLocator serviceLocator)
Copyright © 2018. All rights reserved.