org.beanlet
Annotation Type Execute


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

Methods declared with this annotation are executed by one or more background threads.

Method Constraints

The method on which the Execute 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 'execute' tag is used to identify the element to which this annotation is applied. The other attributes can be specified optionally if the annotation specifies a default value for the particular annotation methods.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
          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">
  <beanlet name="foo" type="com.acme.Foo">
    <execute method="bar" threads="1" loop="false"
             interrupt="false" join="false" description=""/>
  </beanlet>
</beanlets>


Optional Element Summary
 String description
          Description of the underlying executalbe method.
 boolean interrupt
          If true, the running threads are interrupted on destroy.
 boolean join
          If true, the container waits until this component has finished the runnable method on destroy.
 boolean loop
          If true, the method is called in a loop.
 int threads
          Number of threads that call the runnable method concurrently.
 

threads

public abstract int threads
Number of threads that call the runnable method concurrently.

Default:
1

loop

public abstract boolean loop
If true, the method is called in a loop.

Default:
false

interrupt

public abstract boolean interrupt
If true, the running threads are interrupted on destroy.

Default:
false

join

public abstract boolean join
If true, the container waits until this component has finished the runnable method on destroy.

Default:
false

description

public abstract String description
Description of the underlying executalbe method.

Default:
""


Copyright © 2006-2012. All Rights Reserved.