public class BaggageHandlerRegistry
extends java.lang.Object
BaggageHandlerRegistry
manages the mapping of baggage handlers to bag numbers.
BDL-compiled objects must be registered with a static bag number in order to be used. In concept, this is similar to how protocols get mapped to ports (e.g., SSH maps to port 22, etc.). To register a bag, either specify it as a command line configuration value:
-Dbag.22=my.compiled.object.MyObjector in your
application.conf
:
bag.22 = "my.compiled.object.MyObject"or statically in code:
BDLContext.register(22, my.compiled.object.MyObject.class);
Modifier and Type | Method and Description |
---|---|
static void |
add(BagKey key,
BaggageHandler<?> handler)
Registers the provided key with the provided handler.
|
static BagKey |
get(BaggageHandler<?> handler)
Look up the
BagKey that the specified BaggageHandler is registered to |
static void |
remove(BagKey key)
Unregisters the handler for the specified bag key.
|
public static BagKey get(BaggageHandler<?> handler)
BagKey
that the specified BaggageHandler
is registered topublic static void add(BagKey key, BaggageHandler<?> handler)
public static void remove(BagKey key)