org.bushe.swing.event.annotation.EventTopicPatternSubscriber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nifty Show documentation
Show all versions of nifty Show documentation
Nifty GUI is a Java Library that supports the building of interactive user interfaces for games or similar applications. It utilizes OpenGL for rendering and it can be easily integrated into many rendering systems. The configuration of the GUI is stored in xml files with little supporting Java code. In short Nifty helps you to layout stuff, display it in a cool way and interact with it :)
The newest version!
package org.bushe.swing.event.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.bushe.swing.event.EventService;
import org.bushe.swing.event.EventServiceLocator;
import org.bushe.swing.event.ThreadSafeEventService;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface EventTopicPatternSubscriber {
/** The Regular Expression to subscribe to. */
String topicPattern();
/** Whether or not to subscribe to the exact class or a class hierarchy, defaults to class hierarchy (false). */
boolean exact() default false;
/** Whether to subscribe weakly or strongly. */
ReferenceStrength referenceStrength() default ReferenceStrength.WEAK;
/** The event service to subscribe to, default to the EventServiceLocator.SERVICE_NAME_EVENT_BUS. */
String eventServiceName() default EventServiceLocator.SERVICE_NAME_EVENT_BUS;
/**
* Whether or not to autocreate the event service if it doesn't exist on subscription, default is true. If the
* service needs to be created, it must have a default constructor.
*/
Class autoCreateEventServiceClass() default ThreadSafeEventService.class;
/** Determines the order in which this subscriber is called, default is FIFO.*/
int priority() default 0;
}