org.gcube.common.core.informationsystem.publisher
Interface ISLocalPublisher


public interface ISLocalPublisher

Models the generic ISLocalPublisher behavior.
An implementation of the ISLocalPublisher is in charge of publishing local events for changing in the lifetime of GCUBEResource hosted in the current gHN. Local publishing is usually enabled when an instance of the IS is co-hosted on the node.

Author:
Manuele Simi (ISTI-CNR)

Nested Class Summary
static class ISLocalPublisher.GCUBEResourceMessage
           
static class ISLocalPublisher.LocalProfileConsumer
          Base implementation of a GCUBEConsumer of ISLocalPublisher.LocalProfileEvent.
static class ISLocalPublisher.LocalProfileEvent
          Generic GCUBEEvent for notification.
static class ISLocalPublisher.LocalProfileTopic
          A ISLocalPublisher.LocalProfileTopic for profile events
 
Method Summary
 boolean isEnabled(String resourceType, GCUBEScope scope)
          Checks if local publishing is enabled for a type of resource in a given scope
 void subscribeLocalProfileEvents(ISLocalPublisher.LocalProfileConsumer consumer)
          Subscribes a consumer to all ISLocalPublisher.LocalProfileEvent
 

Method Detail

subscribeLocalProfileEvents

void subscribeLocalProfileEvents(ISLocalPublisher.LocalProfileConsumer consumer)
                                 throws ISPublisherException
Subscribes a consumer to all ISLocalPublisher.LocalProfileEvent

Parameters:
consumer - the consumer
Throws:
ISPublisherException - if the registration fails

isEnabled

boolean isEnabled(String resourceType,
                  GCUBEScope scope)
Checks if local publishing is enabled for a type of resource in a given scope

Parameters:
resourceType - a GCUBEResource type
scope - the scope to check
Returns:
true if the local publishing is enabled, false otherwise


Copyright © 2013. All Rights Reserved.