org.mule.config.annotations
Annotation Type Service


@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface Service

An annotation that defines a Mule service. Objects registered with this annotation will be configured as a service in Mule


Optional Element Summary
 int maxAsyncThreads
          If the channel that triggered a call on this object is not expecting a response, how many threads can process the inbound emessages simultaneously
 String name
          The name of this service
 ObjectScope scope
          Determines if this service will be a singleton or prototype.
 

name

public abstract String name
The name of this service

Returns:
the name of this service. This value is required
Default:
""

scope

public abstract ObjectScope scope
Determines if this service will be a singleton or prototype. Note this refers to the actual service object instance i.e. your annotated object. By default singleton is used so that any fields in your objects will retain thier values, making stateful services possible by default. Note that any operations on field variables will need to be thread-safe.

Returns:
true if the service is a singleton
Default:
SINGLETON

maxAsyncThreads

public abstract int maxAsyncThreads
If the channel that triggered a call on this object is not expecting a response, how many threads can process the inbound emessages simultaneously

Returns:
the number of concurrent threads to be used for async processing
Default:
8


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.