org.mule.api.annotations
Annotation Type Source


@Target(value=METHOD)
@Retention(value=SOURCE)
@Documented
public @interface Source

This annotation marks a method inside a Connector as a callable from within a Mule flow and capable of generating Mule events. Each marked method will have a org.mule.api.source.MessageSource generated.

The method must receive a org.mule.api.callback.SourceCallback as one of its arguments. It does not matter which parameter it is as long it is there.


Optional Element Summary
 org.mule.MessageExchangePattern exchangePattern
          Message exchange pattern
 String friendlyName
          A user-friendly name for this processor.
 String name
          The xml name of the element that will invoke this source.
 boolean primaryNodeOnly
          Does this message source must run on all cluster nodes, or just the primary one?
 SourceThreadingModel threadingModel
          Threading model
 

name

public abstract String name
The xml name of the element that will invoke this source. This is optional and if it is not specified a name will be derived from the name of the method.

Default:
""

friendlyName

public abstract String friendlyName
A user-friendly name for this processor.

Default:
""

primaryNodeOnly

public abstract boolean primaryNodeOnly
Does this message source must run on all cluster nodes, or just the primary one?

Default:
false

threadingModel

public abstract SourceThreadingModel threadingModel
Threading model

Default:
org.mule.api.annotations.SourceThreadingModel.SINGLE_THREAD

exchangePattern

public abstract org.mule.MessageExchangePattern exchangePattern
Message exchange pattern

Default:
org.mule.MessageExchangePattern.ONE_WAY


Copyright © 2010–2014 MuleSoft, Inc.. All rights reserved.