public class WhiteboardUtils extends Object
Constructor and Description |
---|
WhiteboardUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
getService(Whiteboard wb,
Class<T> type)
Returns the one of the currently available services from the whiteboard of the tracked type.
|
static <T> T |
getService(Whiteboard wb,
Class<T> type,
Returns the one of the currently available services from the whiteboard of the tracked type.
|
static <T> List<T> |
getServices(Whiteboard wb,
Class<T> type)
Returns the currently available services from the whiteboard of the tracked type.
|
static <T> List<T> |
getServices(Whiteboard wb,
Class<T> type,
Returns the currently available services from the whiteboard of the tracked type.
|
static <T> Registration |
registerMBean(Whiteboard whiteboard,
Class<T> iface,
T bean,
String type,
String name) |
static <T> Registration |
registerMBean(Whiteboard whiteboard,
Class<T> iface,
T bean,
String type,
String name,
Map<String,String> attrs) |
static Registration |
registerObserver(Whiteboard whiteboard,
Observer observer) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
long delayInSeconds) |
static Registration |
scheduleWithFixedDelay(Whiteboard whiteboard,
Runnable runnable,
long delayInSeconds,
boolean runOnSingleClusterNode) |
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, long delayInSeconds)
public static Registration scheduleWithFixedDelay(Whiteboard whiteboard, Runnable runnable, long delayInSeconds, boolean runOnSingleClusterNode)
public static <T> Registration registerMBean(Whiteboard whiteboard, Class<T> iface, T bean, String type, String name)
public static <T> Registration registerMBean(Whiteboard whiteboard, Class<T> iface, T bean, String type, String name, Map<String,String> attrs)
public static Registration registerObserver(Whiteboard whiteboard, Observer observer)
public static <T> List<T> getServices(Whiteboard wb, Class<T> type)
wb
- the whiteboardtype
- the service typepublic static <T> T getService(Whiteboard wb, Class<T> type)
null
public static <T> List<T> getServices(Whiteboard wb, Class<T> type,predicate)
predicate
is
not null
the returned list is limited to the ones that match the predicate.
Note that the underlying tracker is stopped automatically after the services are returned.wb
- the whiteboardtype
- the service typepredicate
- filtering predicate or null
public static <T> T getService(Whiteboard wb, Class<T> type,predicate)
predicate
is
not null
only a service that match the predicate is returned.
Note that the underlying tracker is closed automatically.wb
- the whiteboardtype
- the service typepredicate
- filtering predicate or null
null
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"