org.beanlet.management
Annotation Type SelfNaming


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface SelfNaming

Methods marked with this annotation generate the ObjectName for the underlying beanlet instance. An alternative for this annotation is the NamingStrategy interface.

Method Constraints

Only one method can be marked with this annotation. The method on which the SelfNaming annotation is applied MUST fulfill all of the following criteria:

XML Representation

The following xml-fragment shows how to express this annotation in xml. The italic attribute of the 'self-naming' tag is used to identify the element to which this annotation is applied.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
          xmlns:mx="http://beanlet.org/schema/management"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://beanlet.org/schema/beanlet http://beanlet.org/schema/beanlet/beanlet_1_0.xsd
                               http://beanlet.org/schema/management http://beanlet.org/schema/management/beanlet_management_1_0.xsd">
  <beanlet name="foo" type="com.acme.Foo">
    <mx:self-naming method="bar"/>
  </beanlet>
</beanlets>

See Also:
NamingStrategy



Copyright © 2006-2012. All Rights Reserved.