@Target(value=ANNOTATION_TYPE) @Retention(value=CLASS) public @interface HandlerBinding
HandlerBinding bind its annotated type to a given handler.
The handler name is specified as parameter using the 'namespace:name' format (qualified name).
// Namespace and name will be inferred from the annotation's package name.
@HandlerBinding()
public @interface Foo {}
// No namespace declared, default will be used ('org.apache.felix.ipojo')
@HandlerBinding("foo")
public @interface Foo {}
// Namespace will be 'com.acme' and name: 'foo'
@HandlerBinding("com.acme:foo")
public @interface Foo {}
// Provided namespace and value (for the name) will be used
@HandlerBinding(namespace = "com.acme", value = "foo")
public @interface Foo {}
| Modifier and Type | Optional Element and Description |
|---|---|
String |
namespace
Defines the handler's namespace.
|
String |
value
When used without the namespace attribute, defines both the namespace + name
of a handler in a short notation (if no namespace can be found in the parameter - no ':' separator - fallback
on iPOJO's default namespace):
|
public static final String DEFAULT
public abstract String namespace
@HandlerBinding(namespace = "com.acme", value = "foo")
public @interface Foo {}
public abstract String value
@HandlerBinding("com.acme:foo")
public @interface Foo {}
When used with the namespace attribute, holds the name of the handler (without
its namespace part):
@HandlerBinding(namesapce = "com.acme", value = "foo")
public @interface Foo {}
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.