Class ResolverProviderExtension
java.lang.Object
pt.unl.fct.di.novasys.babel2.core.resolver.ResolverProviderExtension
- All Implemented Interfaces:
ProtocolExtension<ResolverProviderBabelProtocol>, EventHandler<ProtocolEvent>
public class ResolverProviderExtension
extends Object
implements ProtocolExtension<ResolverProviderBabelProtocol>
Extension for the
ResolverProviderBabelProtocol to handle node probe events.-
Field Summary
Fields inherited from interface EventHandler
HANDLER_METHOD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new extension for the given protocol. -
Method Summary
Modifier and TypeMethodDescriptionSet<Class<? extends ProtocolEvent>> Returns the set ofProtocolEventtypes that this extension handles.voidhandleEvent(ProtocolEvent event) Dispatches aProtocolEventthat was previously claimed by this extension (because its type is listed inProtocolExtension.eventsClass()).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ProtocolExtension
annotationClass, registerModifier and TypeMethodDescriptiondefault Set<Class<? extends Annotation>> Returns the set of method-level annotation types that this extension processes.default voidregister(Method method, MethodHandles.Lookup lookup, ResolverProviderBabelProtocol protocol, BabelProtocolHolder holder, Annotation annotation) Called bySharedExecutorProtocolHolderduring initialisation for each method on the protocol that carries one of the annotations returned byProtocolExtension.annotationClass().
-
Constructor Details
-
ResolverProviderExtension
Constructs a new extension for the given protocol.- Parameters:
protocol- the protocol instance
-
-
Method Details
-
handleEvent
Description copied from interface:ProtocolExtensionDispatches aProtocolEventthat was previously claimed by this extension (because its type is listed inProtocolExtension.eventsClass()).- Specified by:
handleEventin interfaceEventHandler<ProtocolEvent>- Specified by:
handleEventin interfaceProtocolExtension<ResolverProviderBabelProtocol>- Parameters:
event- the event to handle; its runtime type is guaranteed to be one of the types returned byProtocolExtension.eventsClass()
-
eventsClass
Description copied from interface:ProtocolExtensionReturns the set ofProtocolEventtypes that this extension handles. Events of these types are routed toProtocolExtension.handleEvent(ProtocolEvent)instead of the protocol's own@UponBabelEvent-annotated handlers.- Specified by:
eventsClassin interfaceProtocolExtension<ResolverProviderBabelProtocol>- Returns:
- a list of event classes; may be empty
-