Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## org.mule.config.annotations.endpoints
Annotation Type Reply

    @Target(value=METHOD)
    @Retention(value=RUNTIME)
    @Documented
    public @interface Reply

An annotation that allows developers to configure a reply channel. Mule will wait on the reply channel before returning. Typically, the @Reply annotation is only used when the @Publish annotation is used, since the result of dispatching to a `Publish` channel will be returned on the @Reply channel.

The @Reply annotation creates an asynchronous reply channel for a remote service to reply to. In the case of JMS, this would listen on the JMSReplyTo address. In the case of other Mule services, the transport can set up a reply channel.

Required Element Summary
`String` | `uri` The name or URI address of the endpoint to use.

Optional Element Summary
`String` | `callback` The name of the callback method to call on the annotated class when a reply is received.
`String` | `connector` The connector reference that will be used to create this endpoint.
`boolean` | `failOnTimeout` When false, if no message is received the router will stop waiting without throwing an exception.
`String` | `filter` An expression filter used to filter out unwanted messages.
`String` | `id` An optional identifier for this endpoint.
`int` | `replyTimeout` The amount of time to wait for a response message in milliseconds.

Element Detail

### uri

    public abstract String uri

  The name or URI address of the endpoint to use. The URI would be literal, which is not recommended. Instead, you can use either the name of a global endpoint that is already available in the registry, or you can use a property placeholder and the real value will be injected at runtime. For example: `@Reply(endpoint = "${my.endpoint}")` The endpoint would then be resolved to a property called 'my.endpoint' that is regeistered with the registry.

  Expressions can also be used. For example: `@Reply(endpoint = "$[mule.message.header(JMSReplyTo)]")`

  Returns:
    A string representation of the endpoint URI, name, or property placeholder.

### connector

    public abstract String connector

  The connector reference that will be used to create this endpoint. It is important that the endpoint protocol and the connector correlate. For example, if your endpoint is a JMS queue, your connector must be a JMS connector. Many transports such as HTTP do not need a connector to be present, since Mule can create a default one as needed.

  The connector reference can be a reference to a connector in the local registry or a reference to an object in Galaxy.

  TODO: describe how connectors are created

  Returns:
    the connector name associated with the endpoint
  Default:
    ""

### filter

    public abstract String filter

  An expression filter used to filter out unwanted messages. The filter syntax uses familiar Mule expression syntax: `filter = "wildcard:*.txt"` or `filter = "xpath:count(Batch/Trade/GUID) > 0"`

  Filter expressions must result in a boolean or null to mean false.

  Returns:
    A filter expression string or empty string if not defined.
  Default:
    ""

### replyTimeout

    public abstract int replyTimeout

  The amount of time to wait for a response message in milliseconds.

  Returns:
    the amount of time to wait for a response message in milliseconds
  Default:
    5000

### failOnTimeout

    public abstract boolean failOnTimeout

  When false, if no message is received the router will stop waiting without throwing an exception. If a 'callback' method is set, the method will be invoked with a `NullPayload`. If the expected message is received after the timeout, it will be ignored but Mule will fire a `org.mule.context.notification.RoutingNotification.MISSED_ASYNC_REPLY` notification with the received message.

  Returns:
    true if the reply channel will throw an exception if a reply is not received before the timeout elapses.
  Default:
    true

### callback

    public abstract String callback

  The name of the callback method to call on the annotated class when a reply is received. This callback method can be used to alter any reply messages before they are sent back to the client that initiated the request. This callback method does not have to be defined, and Mule will pass back the reply data to the client.

  Returns:
    The method name to call when a reply is received or empty string if not defined
  Default:
    ""

### id

    public abstract String id

  An optional identifier for this endpoint. This is only used by Mule to identify the endpoint when logging messages, firing notifications, and for JMX management.

  Returns:
    the name associated with this endpoint
  Default:
    ""

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

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