org.softamis.cluster4spring
Interface AutoDiscoveredServiceExporter

All Known Implementing Classes:
AbstractRmiServiceExporter, MultihomeRmiServiceExporter, RmiServiceExporter

public interface AutoDiscoveredServiceExporter

Interface that should be implemented by appropriate remote service exporter to be included into list of services that may be published for autodiscovering (via corresponding ServicePublisher).

Each service exported by exporter may belong to some "group".

Author:
Andrew Sazonov
See Also:
ServicePublisher, ExporterAcceptor

Field Summary
static java.lang.String DEFAULT_SERVICES_GROUP_PREFIX
          Default services group name (used if group name is not specified explicitely)
 
Method Summary
 java.lang.String getServiceGroup()
          Services exporter by exporters may belong to serveral groups.
 java.lang.String getServiceName()
          Returns name of the service
 boolean isAllowsAutoDiscovering()
          Indicates whether particular exporter is available for publishing in auto-discoverable services.
 java.util.List<java.lang.String> provideExportedServiceURLs()
          Returns list of URLs that could be used to locate service
 

Field Detail

DEFAULT_SERVICES_GROUP_PREFIX

static final java.lang.String DEFAULT_SERVICES_GROUP_PREFIX
Default services group name (used if group name is not specified explicitely)

See Also:
Constant Field Values
Method Detail

isAllowsAutoDiscovering

boolean isAllowsAutoDiscovering()
Indicates whether particular exporter is available for publishing in auto-discoverable services. In general, the final solution about including particular exporter into list of services available for autodiscovered is delegated to appropriate implementation of ExporterAcceptor, however, this methods (if implementation of Exporter is aware of it) allows to disable automatic service publishing.

Returns:
true if exporter could be published for auto-discovering
See Also:
ExporterAcceptor

getServiceGroup

java.lang.String getServiceGroup()
Services exporter by exporters may belong to serveral groups. In general, the groups of services are intended to support auto-discovering services and are less important if client uses one or more predefined services' URL's.

Groups could be used by ServicePublishers to select which services should be published and also allows to precisly control discovered services visibility on the client side.

Returns:
name of group which exported service belong to.

provideExportedServiceURLs

java.util.List<java.lang.String> provideExportedServiceURLs()
Returns list of URLs that could be used to locate service

Returns:
list of service URL's

getServiceName

java.lang.String getServiceName()
Returns name of the service

Returns:
service name