public final class GCUBELocalPublisher extends Object implements org.gcube.common.core.informationsystem.publisher.ISLocalPublisher
GCUBEResource as local eventsorg.gcube.common.core.informationsystem.publisher.ISLocalPublisher.GCUBEResourceMessage, org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileConsumer, org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileEvent, org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileTopic| Modifier and Type | Field and Description |
|---|---|
protected static org.gcube.common.core.utils.events.GCUBEProducer<org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileTopic,Object> |
eventProducer
Internal
GCUBEProducer for LocalProfileEvent. |
protected static org.gcube.common.core.utils.logging.GCUBELog |
logger |
| Constructor and Description |
|---|
GCUBELocalPublisher() |
| Modifier and Type | Method and Description |
|---|---|
static GCUBELocalPublisher |
getManager()
Returns the local publisher
|
boolean |
isEnabled(String resourceType,
org.gcube.common.core.scope.GCUBEScope scope)
Checks if the local publishing is enabled or not for the given scope
|
void |
notifyResourceRegistered(org.gcube.common.core.resources.GCUBEResource resource,
org.gcube.common.core.scope.GCUBEScope scope)
Notifies that a @link
GCUBEResource has been created |
void |
notifyResourceRemoved(String ID,
String type,
org.gcube.common.core.scope.GCUBEScope scope)
Notifies that a @link
GCUBEResource has been removed |
void |
notifyResourceUpdated(org.gcube.common.core.resources.GCUBEResource resource,
org.gcube.common.core.scope.GCUBEScope scope)
Notifies that a @link
GCUBEResource has been updated |
void |
subscribeLocalProfileEvents(org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileConsumer consumer)
Subscribes a consumer to all
LocalProfileEvent. |
protected static final org.gcube.common.core.utils.logging.GCUBELog logger
protected static org.gcube.common.core.utils.events.GCUBEProducer<org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileTopic,Object> eventProducer
GCUBEProducer for LocalProfileEvent.public void subscribeLocalProfileEvents(org.gcube.common.core.informationsystem.publisher.ISLocalPublisher.LocalProfileConsumer consumer)
throws GCUBEPublisherException
LocalProfileEvent.subscribeLocalProfileEvents in interface org.gcube.common.core.informationsystem.publisher.ISLocalPublisherconsumer - the consumerException - if the subscription could not be completed.GCUBEPublisherExceptionpublic static GCUBELocalPublisher getManager()
public void notifyResourceRemoved(String ID, String type, org.gcube.common.core.scope.GCUBEScope scope) throws Exception
GCUBEResource has been removedresource - the resourceExceptionpublic void notifyResourceRegistered(org.gcube.common.core.resources.GCUBEResource resource,
org.gcube.common.core.scope.GCUBEScope scope)
throws Exception
GCUBEResource has been createdresource - the resourceExceptionpublic void notifyResourceUpdated(org.gcube.common.core.resources.GCUBEResource resource,
org.gcube.common.core.scope.GCUBEScope scope)
throws Exception
GCUBEResource has been updatedresource - the resourceExceptionpublic boolean isEnabled(String resourceType, org.gcube.common.core.scope.GCUBEScope scope)
isEnabled in interface org.gcube.common.core.informationsystem.publisher.ISLocalPublisherscope - the scope to checkCopyright © 2017. All Rights Reserved.