org.apache.servicemix.nmr.api
Interface EndpointRegistry

All Superinterfaces:
ServiceRegistry<Endpoint>

public interface EndpointRegistry
extends ServiceRegistry<Endpoint>

The Registry is used to register endpoints, unregister them, query endpoints and create a Channel to interfact with them.

Since:
4.0
Version:
$Revision: $

Method Summary
 Reference lookup(org.w3c.dom.Document xml)
          This methods creates a Reference from its xml representation.
 Reference lookup(java.util.Map<java.lang.String,?> properties)
          From a given amount of metadata which could include interface name, service name policy data and so forth, choose an available endpoint reference to use for invocations.
 Reference lookup(java.lang.String filter)
          Creates a Reference that select endpoints that match the given LDAP filter.
 java.util.List<Endpoint> query(java.util.Map<java.lang.String,?> properties)
          Query the registry for a list of registered endpoints.
 void register(Endpoint endpoint, java.util.Map<java.lang.String,?> properties)
          Register the given endpoint in the registry.
 void unregister(Endpoint endpoint, java.util.Map<java.lang.String,?> properties)
          Unregister a previously register enpoint.
 
Methods inherited from interface org.apache.servicemix.nmr.api.service.ServiceRegistry
getProperties, getServices
 

Method Detail

register

void register(Endpoint endpoint,
              java.util.Map<java.lang.String,?> properties)
Register the given endpoint in the registry. In an OSGi world, this would be performed automatically by a ServiceTracker. Upon registration, a Channel will be injected onto the Endpoint using the Endpoint.setChannel(Channel) method.

Specified by:
register in interface ServiceRegistry<Endpoint>
Parameters:
endpoint - the endpoint to register
properties - the metadata associated with this endpoint

unregister

void unregister(Endpoint endpoint,
                java.util.Map<java.lang.String,?> properties)
Unregister a previously register enpoint. In an OSGi world, this would be performed automatically by a ServiceTracker.

Specified by:
unregister in interface ServiceRegistry<Endpoint>
Parameters:
endpoint - the endpoint to unregister
properties - the metadata associated with this endpoint

query

java.util.List<Endpoint> query(java.util.Map<java.lang.String,?> properties)
Query the registry for a list of registered endpoints.

Parameters:
properties - filtering data
Returns:
the list of endpoints matching the filters

lookup

Reference lookup(java.util.Map<java.lang.String,?> properties)
From a given amount of metadata which could include interface name, service name policy data and so forth, choose an available endpoint reference to use for invocations. This could return actual endpoints, or a dynamic proxy to a number of endpoints

Parameters:
properties - filtering data

lookup

Reference lookup(org.w3c.dom.Document xml)
This methods creates a Reference from its xml representation.

Parameters:
xml - the xml document describing this reference
Returns:
a new Reference
See Also:
Reference.toXml()

lookup

Reference lookup(java.lang.String filter)
Creates a Reference that select endpoints that match the given LDAP filter.

Parameters:
filter - a LDAP filter used to find matching endpoints
Returns:
a new Reference that uses the given filter


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.