org.ow2.petals.microkernel.api.jbi.messaging.registry
Interface EndpointRegistry

All Superinterfaces:
EndpointRegistryMBean

public interface EndpointRegistry
extends EndpointRegistryMBean

This class is used to manage everything that deals with endpoint in the distributed environment.

Author:
ddesjardins - EBM WebSourcing, Olivier Fabre - EBM WebSourcing

Field Summary
static String COMPONENT_LOGGER_NAME
           
 
Method Summary
 ServiceEndpoint activateEndpoint(QName serviceName, String endpointName, List<QName> interfaces, Document description, ServiceEndpoint address)
          Register an endpoint in the endpoints registry.
 void deactivateEndpoint(String endpointName, QName serviceName)
          Deactivates the local given endpoint.
 void deregisterConnection(QName consInterface, QName provService, String provEndpoint)
          Delete a connection
 void deregisterConnection(QName consService, String consEndpoint, QName provService, String provEndpoint)
          Delete a connection
 void deregisterExternalEndpoint(String endpointName, QName serviceName)
          Deregister external endpoint
 ServiceEndpoint getEndpoint(QName service, String name)
          Get the service endpoint for the named activated endpoint, if any.
 Document getEndpointDescriptorForEndpoint(ServiceEndpoint endpoint)
          Return the descriptor for a specified endpoint.
 List<ServiceEndpoint> getEndpoints()
           
 List<ServiceEndpoint> getExternalEndpoints()
           
 ServiceEndpoint[] getExternalEndpointsForInterface(QName interfaceName)
          Queries the registry for external endpoints that implements the given interface name
 ServiceEndpoint[] getExternalEndpointsForService(QName serviceName)
          Queries the registry for external endpoints that are part of the given service name
 QName[] getInterfacesForEndpoint(ServiceEndpoint endpoint)
          Return the interfaces for the specified endpoint.
 List<ServiceEndpoint> getInternalEndpoints()
           
 ServiceEndpoint[] getInternalEndpointsForInterface(QName interfaceName, org.ow2.petals.jbi.descriptor.original.generated.LinkType linktype)
          Queries the registry for active endpoints that implements the given interface, according to the link type.
 ServiceEndpoint[] getInternalEndpointsForService(QName serviceName, org.ow2.petals.jbi.descriptor.original.generated.LinkType linktype)
          Queries the registry for active endpoints belonging to the given service, according to the link type.
 List<RegistryListener> getListeners()
          Get the list of registry listeners.
 List<ServiceEndpoint> query(String endpoint, QName itf, QName service, String containerName, String componentName, String subDomainName, String type)
           
 void registerConnection(QName consInterface, QName provService, String provEndpoint)
          Register a connection
 void registerConnection(QName consService, String consEndpoint, QName provService, String provEndpoint)
          Register a connection
 void registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
          Register this given external endpoint
 void removeAllLocalEndpoints()
          Remove all the local endpoints.
 
Methods inherited from interface org.ow2.petals.microkernel.api.jbi.messaging.registry.EndpointRegistryMBean
getAllEndpoints, getAllExternalEndpoints, getAllInternalEndpoints, getDescription, synchronizeRegistry
 

Field Detail

COMPONENT_LOGGER_NAME

static final String COMPONENT_LOGGER_NAME
See Also:
Constant Field Values
Method Detail

getListeners

List<RegistryListener> getListeners()
Get the list of registry listeners. This can be used iin the implementation to do special things such as monitoring etc...

Returns:

getInternalEndpoints

List<ServiceEndpoint> getInternalEndpoints()
                                           throws RegistryException
Throws:
RegistryException

getExternalEndpoints

List<ServiceEndpoint> getExternalEndpoints()
                                           throws RegistryException
Throws:
RegistryException

getEndpoints

List<ServiceEndpoint> getEndpoints()
                                   throws RegistryException
Throws:
RegistryException

activateEndpoint

ServiceEndpoint activateEndpoint(QName serviceName,
                                 String endpointName,
                                 List<QName> interfaces,
                                 Document description,
                                 ServiceEndpoint address)
                                 throws EndpointAlreadyExistsException,
                                        RegistryException
Register an endpoint in the endpoints registry.

Parameters:
serviceName - Endpoint service name.
endpointName - Endpoint name
interfaces - Endpoint interfaces
description - Endpoint WSDL
address -
Returns:
A ServiceEndpoint associated to the registered endpoint.
Throws:
EndpointAlreadyExistsException - The endpoint is already registered.
RegistryException

deactivateEndpoint

void deactivateEndpoint(String endpointName,
                        QName serviceName)
                        throws RegistryException
Deactivates the local given endpoint. Does not care about remotes ones !

Throws:
javax.jbi.JBIException - if the endpoint cannot be deactivated
RegistryException

registerExternalEndpoint

void registerExternalEndpoint(javax.jbi.servicedesc.ServiceEndpoint serviceEndpoint)
                              throws RegistryException
Register this given external endpoint

Parameters:
externalEndpoint - the external endpoint to be registered; must be non null
Throws:
javax.jbi.JBIException - if an external endpoint wit the same name is already registered
RegistryException

deregisterExternalEndpoint

void deregisterExternalEndpoint(String endpointName,
                                QName serviceName)
                                throws RegistryException
Deregister external endpoint

Parameters:
endpoint - external to be deregistered; must be non null
Throws:
javax.jbi.JBIException - if the endpoint cannot be deregistered
RegistryException

registerConnection

void registerConnection(QName consInterface,
                        QName provService,
                        String provEndpoint)
                        throws RegistryException
Register a connection

Parameters:
consInterface - consumer interface name; must be non null
provService - provider service name; must be non null
provEndpoint - provider endpoint name; must be non null
Throws:
javax.jbi.JBIException - if a problem occurs in the registry
RegistryException

registerConnection

void registerConnection(QName consService,
                        String consEndpoint,
                        QName provService,
                        String provEndpoint)
                        throws RegistryException
Register a connection

Parameters:
consService - consumer service name; must be non null
consEndpoint - consumer endpoint name; must be non null
provService - provider service name; must be non null
provEndpoint - provider endpoint name; must be non null
Throws:
javax.jbi.JBIException - if a problem occurs in the registry
RegistryException

deregisterConnection

void deregisterConnection(QName consInterface,
                          QName provService,
                          String provEndpoint)
                          throws RegistryException
Delete a connection

Parameters:
consInterface - consumer interface name; must be non null
provService - provider service name; must be non null
provEndpoint - provider endpoint name; must be non null
Throws:
javax.jbi.JBIException - if the connection can not be deleted
RegistryException

deregisterConnection

void deregisterConnection(QName consService,
                          String consEndpoint,
                          QName provService,
                          String provEndpoint)
                          throws RegistryException
Delete a connection

Parameters:
consService - consumer service name; must be non null
consEndpoint - consumer endpoint name; must be non null
provService - provider service name; must be non null
provEndpoint - provider endpoint name; must be non null
Throws:
javax.jbi.JBIException - if the connection can not be deleted
RegistryException

getEndpointDescriptorForEndpoint

Document getEndpointDescriptorForEndpoint(ServiceEndpoint endpoint)
                                          throws RegistryException
Return the descriptor for a specified endpoint. It can not be a connection endpoint.

Parameters:
endpoint - endpoint on which we want to retrieve the descriptor; must be non null
Returns:
Document the DOM representation of the descriptor (WSDL)
Throws:
RegistryException

getInterfacesForEndpoint

QName[] getInterfacesForEndpoint(ServiceEndpoint endpoint)
Return the interfaces for the specified endpoint. This will get this information from the registry. The endpoint information is not updated with the new data !

Parameters:
endpoint - endpoint on which we want to retrieve the interface names; must be non null and not a connection endpoint
Returns:
Array of interfaces QName

getInternalEndpointsForInterface

ServiceEndpoint[] getInternalEndpointsForInterface(QName interfaceName,
                                                   org.ow2.petals.jbi.descriptor.original.generated.LinkType linktype)
                                                   throws RegistryException
Queries the registry for active endpoints that implements the given interface, according to the link type.

Parameters:
interfaceName - qualified interface/portType that is implemented by the endpoints; if null then all activated endpoints in the JBI environment must be returned
Returns:
an array of available endpoints for the specified interface name; must be non null, may be empty
Throws:
RegistryException

getInternalEndpointsForService

ServiceEndpoint[] getInternalEndpointsForService(QName serviceName,
                                                 org.ow2.petals.jbi.descriptor.original.generated.LinkType linktype)
                                                 throws RegistryException
Queries the registry for active endpoints belonging to the given service, according to the link type.

Parameters:
serviceName - qualified name of the service that the endpoints are part of; must be non null
Returns:
an array of available endpoints for the specified service name; must be non null, may be empty
Throws:
RegistryException

getExternalEndpointsForInterface

ServiceEndpoint[] getExternalEndpointsForInterface(QName interfaceName)
                                                   throws RegistryException
Queries the registry for external endpoints that implements the given interface name

Parameters:
interfaceName - qualified name of interface implemented by the endpoints; can be null
Returns:
an array of availabe endpoints for the specified interface name; returns all availabe endpoints if interface name is null; must be non null, may be empty
Throws:
RegistryException

getExternalEndpointsForService

ServiceEndpoint[] getExternalEndpointsForService(QName serviceName)
                                                 throws RegistryException
Queries the registry for external endpoints that are part of the given service name

Parameters:
serviceName - qualified name of service that contains endpoints; must be non null
Returns:
an array of available endpoints for the specified service name; must be non null, may be empy
Throws:
RegistryException

getEndpoint

ServiceEndpoint getEndpoint(QName service,
                            String name)
                            throws RegistryException
Get the service endpoint for the named activated endpoint, if any. It can be a connection.

Parameters:
service - qualified name of the endpoint's service; must be non null
name - name of the endpoint; must be non null
Returns:
the named endpoint, or null if the named endpoint is not activated
Throws:
RegistryException

query

List<ServiceEndpoint> query(String endpoint,
                            QName itf,
                            QName service,
                            String containerName,
                            String componentName,
                            String subDomainName,
                            String type)
                            throws RegistryException
Parameters:
endpoint -
interfaces -
service -
containerName -
componentName -
subDomainName -
type -
Returns:
Throws:
RegistryException

removeAllLocalEndpoints

void removeAllLocalEndpoints()
                             throws RegistryException
Remove all the local endpoints. If the registry is a distributed one, propagate the delete action to them.

Throws:
RegistryException


Copyright © 2005-2015 Linagora. All Rights Reserved.