Index

A C D E F H I K N O R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values

A

Any - Static variable in annotation interface org.gcube.common.events.Observes
Default qualifier for events that should be observed by all observers regardless of specific qualifiers.

C

configure(Hub) - Static method in class org.gcube.common.events.utils.HubFactory
Sets the shared Hub instance, overriding the default one.
containsVariable(Type) - Static method in class org.gcube.common.events.impl.ReflectionUtils
Checks if the given type contains type variables.
critical - Enum constant in enum class org.gcube.common.events.Observes.Kind
Critical observers must execute successfully for the event processing to be considered successful.

D

DefaultHub - Class in org.gcube.common.events.impl
Default Hub implementation.
DefaultHub() - Constructor for class org.gcube.common.events.impl.DefaultHub
Creates a new DefaultHub with a cached thread pool executor service.
DefaultHub(ExecutorService) - Constructor for class org.gcube.common.events.impl.DefaultHub
Creates a new DefaultHub with the specified executor service.

E

elementTypeOf(Type) - Static method in class org.gcube.common.events.impl.ReflectionUtils
Returns the element type of a Collection type.
equals(Object) - Method in class org.gcube.common.events.impl.Observer
 
Event<T> - Class in org.gcube.common.events.impl
Event wrapper that captures the parametric type of events.
Event(T) - Constructor for class org.gcube.common.events.impl.Event
Creates an event wrapper with the specified event object.
every() - Element in annotation interface org.gcube.common.events.Observes
The minimum duration in milliseconds between the delivery of two subsequent events.

F

fire(Object, String...) - Method in interface org.gcube.common.events.Hub
Fires an event to all observers which have subscribed for them, blocking the client until all the critical observers have executed.
fire(Object, String...) - Method in class org.gcube.common.events.impl.DefaultHub
 

H

hashCode() - Method in class org.gcube.common.events.impl.Observer
 
hub() - Static method in class org.gcube.common.events.utils.HubFactory
Returns the shared Hub instance.
Hub - Interface in org.gcube.common.events
Mediates between producers and observers of events.
HubFactory - Class in org.gcube.common.events.utils
Convenience factory to share Hub instances.

I

isCollectionType(Type) - Static method in class org.gcube.common.events.impl.ReflectionUtils
Checks if the given type is a Collection type.

K

key() - Method in class org.gcube.common.events.impl.Observer
Returns the key that identifies the event type and qualifiers this observer listens to.
kind() - Method in class org.gcube.common.events.impl.Observer
Returns the kind of this observer (critical, safe, or resilient).
kind() - Element in annotation interface org.gcube.common.events.Observes
The kind of the observer Observes.Kind.safe by default.

N

notEmpty(String, String) - Static method in class org.gcube.common.events.impl.Utils
Validates that a string is not empty.
notNull(Object) - Static method in class org.gcube.common.events.impl.Utils
Validates that an object is not null.
notNull(String, Object) - Static method in class org.gcube.common.events.impl.Utils
Validates that an object is not null.

O

Observer - Class in org.gcube.common.events.impl
Used internally to wrap arbitrary objects subscribed as observers.
observerMethodsOf(Object) - Static method in class org.gcube.common.events.impl.Observer
Extracts all methods annotated with @Observes from the given object.
observersFor(Object, ExecutorService) - Static method in class org.gcube.common.events.impl.Observer
Creates observer wrappers for all @Observes methods in the given object.
Observes - Annotation Interface in org.gcube.common.events
Identifies callback methods in event observers.
Observes.Kind - Enum Class in org.gcube.common.events
onEvent(Object) - Method in class org.gcube.common.events.impl.Observer
Handles an event by either processing it immediately or accumulating it for delayed processing.
onEventDelayed(Object) - Method in class org.gcube.common.events.impl.Observer
Accumulates an event for delayed processing according to the configured delay.
onEventImmediate(Object) - Method in class org.gcube.common.events.impl.Observer
Processes an event immediately by invoking the observer method.
org.gcube.common.events - package org.gcube.common.events
 
org.gcube.common.events.impl - package org.gcube.common.events.impl
 
org.gcube.common.events.utils - package org.gcube.common.events.utils
 

R

ReflectionUtils - Class in org.gcube.common.events.impl
Library-wide reflection utilities.
resilient - Enum constant in enum class org.gcube.common.events.Observes.Kind
Resilient observers execute asynchronously regardless of critical observer failures.

S

safe - Enum constant in enum class org.gcube.common.events.Observes.Kind
Safe observers execute asynchronously and only if no critical observers have failed.
stop() - Method in interface org.gcube.common.events.Hub
Signals that this hub is no longer needed and can release its resources.
stop() - Method in class org.gcube.common.events.impl.DefaultHub
 
subscribe(Object) - Method in interface org.gcube.common.events.Hub
Subscribes an observer for notification of events of a given type.
subscribe(Object) - Method in class org.gcube.common.events.impl.DefaultHub
 

T

typeOf(Object) - Static method in class org.gcube.common.events.impl.ReflectionUtils
Returns the actual type of an event, handling Event wrappers appropriately.

U

unsubscribe(Object) - Method in interface org.gcube.common.events.Hub
Unsubscribes an observer.
unsubscribe(Object) - Method in class org.gcube.common.events.impl.DefaultHub
 
Utils - Class in org.gcube.common.events.impl
Library-wide utilities.

V

valid(String, String) - Static method in class org.gcube.common.events.impl.Utils
Validates that a string is not null and not empty.
valid(String, String[]) - Static method in class org.gcube.common.events.impl.Utils
Validates that a string array is not null and all its elements are not null and not empty.
valid(String, Collection<String>) - Static method in class org.gcube.common.events.impl.Utils
Validates that a collection is not null and all its elements are not null and not empty.
value() - Element in annotation interface org.gcube.common.events.Observes
The event qualifiers.
valueOf(Object) - Static method in class org.gcube.common.events.impl.ReflectionUtils
Returns the actual value of an event, unwrapping Event wrappers if necessary.
valueOf(String) - Static method in enum class org.gcube.common.events.Observes.Kind
Returns the enum constant of this class with the specified name.
values() - Static method in enum class org.gcube.common.events.Observes.Kind
Returns an array containing the constants of this enum class, in the order they are declared.

W

waitFor(Class<?>) - Method in interface org.gcube.common.events.Hub
Blocks the caller until an event of a given type occurs.
waitFor(Class<?>) - Method in class org.gcube.common.events.impl.DefaultHub
 
waitFor(Class<?>, long, TimeUnit) - Method in interface org.gcube.common.events.Hub
Blocks the caller until an event of a given type occurs or a given length of time elapses.
waitFor(Class<?>, long, TimeUnit) - Method in class org.gcube.common.events.impl.DefaultHub
 
A C D E F H I K N O R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values