public interface SharedAreaService extends MutableImplementation
leaveTopology()
: when the component is stopped, the
container is not removed from the topology in the shared memory.
The idea is that adding or removing a container to a topology is a administration operation.
All the other operations are related to endpoint management: the topology operations are reduced to their minimum in
this interface.Modifier and Type | Interface and Description |
---|---|
static class |
SharedAreaService.SavedEndpoint |
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_LOGGER_NAME |
static String |
CONFIGURATION_FRACTAL_ITF_NAME
The name of the client interface of the component for the
configuration service.
|
static String |
FRACTAL_SRV_ITF_NAME
Name of the server interface of the Fractal component
|
Modifier and Type | Method and Description |
---|---|
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint |
deregisterEndpoint(QName serviceName,
String endpointName)
Deregister the given endpoint.
|
Document |
getDescription(QName serviceName,
String endpointName)
Returns an endpoint description as a DOM Document
|
Document |
getDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Returns the ServiceEndpoint description as a DOM Document
|
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint |
getEndpoint(QName serviceName,
String endpointName)
Get the service endpoint for the named registered endpoint, if any.
|
Collection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> |
getEndpoints(org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type)
Retrieve registered endpoints.
|
Collection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> |
getEndpointsForInterface(QName interfaceName,
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type)
Get endpoints implementing the interface '
interfaceName '. |
Collection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> |
getEndpointsForService(QName serviceName,
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type)
Get endpoints implementing the service '
serviceName '. |
boolean |
isRegisteredEndpoint(QName serviceName,
String endpointName)
Check if an endpoint is registered
|
void |
joinTopology(Collection<SharedAreaService.SavedEndpoint> endpoints)
Join the current topology configured in the
ConfigurationService (if it's a dynamic topology, we add
ourselves to it) and start listening to topology changes. |
Collection<SharedAreaService.SavedEndpoint> |
leaveTopology()
Leave the current topology (if it's a dynamic topology, we remove ourselves from it) and stops listening to
topology changes.
|
void |
loadTopology(Collection<SharedAreaService.SavedEndpoint> endpoints)
Load the topology configured in the
ConfigurationService or from the shared area and start listening to
topology changes. |
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint |
registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint,
org.ow2.petals.jbi.servicedesc.endpoint.Location location,
Document description,
boolean canOverwrite)
Register an endpoint in the shared area.
|
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint |
registerInternalEndpoint(String endpointName,
QName serviceName,
QName[] interfaces,
org.ow2.petals.jbi.servicedesc.endpoint.Location location,
Document description,
boolean canOverwrite)
Register an internal endpoint in the shared area.
|
getConfiguration, getImplementationName, getImplementationVersion, getTopologyPartConfiguration
static final String COMPONENT_LOGGER_NAME
static final String FRACTAL_SRV_ITF_NAME
static final String CONFIGURATION_FRACTAL_ITF_NAME
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint registerInternalEndpoint(String endpointName, QName serviceName, QName[] interfaces, org.ow2.petals.jbi.servicedesc.endpoint.Location location, Document description, boolean canOverwrite) throws SharedAreaException
Register an internal endpoint in the shared area.
Note: If the endpoint already exists andcanOverwrite
is set to true
, it is
overridden, else, the method returns false
.endpointName
- Endpoint nameserviceName
- Endpoint service name.interfaces
- Endpoint interfaceslocation
- Endpoint location. Not null
.description
- Endpoint WSDLcanOverwrite
- If set to true
, if the endpoint already exists, it will be overwritten, otherwise the
error EndpointAlreadyExistsException
is thrown.PetalsServiceEndpoint
for the registered endpoint or null
if the endpoint already
exists, and canOverwrite
is not set to true
.SharedAreaException
- An error occurs registering the endpointorg.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint endpoint, org.ow2.petals.jbi.servicedesc.endpoint.Location location, Document description, boolean canOverwrite) throws SharedAreaException
Register an endpoint in the shared area.
Note: If the endpoint already exists andcanOverwrite
is set to true
, it is
overridden, else, the method returns false
.endpoint
- Endpointlocation
- Endpoint location. Not null
.description
- Endpoint WSDL to registercanOverwrite
- If set to true
, if the endpoint already exists, it will be overwritten.PetalsServiceEndpoint
for the registered endpoint or null
if the endpoint already
exists, and canOverwrite
is not set to true
.SharedAreaException
- An error occurs registering the endpointorg.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint deregisterEndpoint(QName serviceName, String endpointName) throws SharedAreaException
serviceName
- qualified name of the endpoint's service; must be non nullendpointName
- name of the endpoint; must be non nullSharedAreaException
- An error occurred deregistering the endpointboolean isRegisteredEndpoint(QName serviceName, String endpointName) throws SharedAreaException
serviceName
- qualified name of the endpoint's service; must be non nullendpointName
- name of the endpoint; must be non nulltrue
if the endpoint is registeredSharedAreaException
- if an error occurs checking the endpoint existenceCollection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> getEndpoints(org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type) throws SharedAreaException
Retrieve registered endpoints. The returned collection is not backed by the shared area.
type
- The type that the endpoints must implement. Can be null
.type
' or all endpoints if 'type
' is null
SharedAreaException
org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint getEndpoint(QName serviceName, String endpointName) throws SharedAreaException
Get the service endpoint for the named registered endpoint, if any.
Note: this method could be implemented at endpoint directory level getting all endpoints and filtering them, but for performance reasons some optimization can be done if the shared area provides directly such a method.
serviceName
- qualified name of the endpoint's service; must be non nullendpointName
- name of the endpoint; must be non nullSharedAreaException
Collection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> getEndpointsForInterface(QName interfaceName, org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type) throws SharedAreaException
Get endpoints implementing the interface 'interfaceName
'. The returned collection is not backed by
the shared area.
interfaceName
- qualified name of interface implemented by the endpoints; must be non-nulltype
- The type that the endpoints must implement. Can be null
.SharedAreaException
- A parameter is invalid, or an error occurs searching endpointsCollection<org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint> getEndpointsForService(QName serviceName, org.ow2.petals.jbi.servicedesc.endpoint.PetalsServiceEndpoint.EndpointType type) throws SharedAreaException
Get endpoints implementing the service 'serviceName
'. The returned collection is not backed by the
shared area.
serviceName
- The service that the endpoints must implement. Must be non-null.type
- The type that the endpoints must implement. Can be null
.serviceName
'SharedAreaException
- A parameter is invalid, or an error occurs searching endpointsDocument getDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint) throws SharedAreaException
endpoint
- the endpointnull
if there is no such
descriptionSharedAreaException
- if an error occurs during endpoint description retrievalDocument getDescription(QName serviceName, String endpointName) throws SharedAreaException
serviceName
- the service nameendpointName
- the endpoint namenull
if there is no such
descriptionSharedAreaException
- if an error occurs during endpoint description retrievalCollection<SharedAreaService.SavedEndpoint> leaveTopology() throws SharedAreaException
SharedAreaException
void joinTopology(Collection<SharedAreaService.SavedEndpoint> endpoints) throws SharedAreaException
ConfigurationService
(if it's a dynamic topology, we add
ourselves to it) and start listening to topology changes.
It also activate all the local endpoints passed as argument.endpoints
- the list of previously removed endpointsSharedAreaException
void loadTopology(Collection<SharedAreaService.SavedEndpoint> endpoints) throws SharedAreaException
ConfigurationService
or from the shared area and start listening to
topology changes.
It also activate all the local endpoints passed as argument.endpoints
- the list of previously removed endpointsSharedAreaException
Copyright © 2005-2016 Linagora. All Rights Reserved.