org.mule.config.annotations.endpoints
Annotation Type Bind


Deprecated. use an ibean instead. Keeping this around in case there are some valid reasons to use it we have not thought of yet.

@Target(value=FIELD)
@Retention(value=RUNTIME)
@Documented
public @interface Bind

An EndpointBinding annotation allows for endpoints to be bound to an interface method, so that when the method on the interface is called, the endpoint will be invoked. Annotating a class field with this means that a proxy object will be injected as the field member. The field cannot be final but can be private. There is no need to have bean getter and setter methods for this field.

If this annotatated field enforces Java language access control, and the underlying field is inaccessible, the method throws an IllegalAccessException.


Required Element Summary
 String uri
          Deprecated. The name or URI address of the endpoint to use.
 
Optional Element Summary
 String connector
          Deprecated. The connector reference that will be used to create this endpoint.
 String id
          Deprecated. An optional identifier for this endpoint.
 String method
          Deprecated. The method to called on the bound interface.
 

Element Detail

uri

public abstract String uri
Deprecated. 
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: @EndpointBinding(endpoint = "${my.endpoint}") The endpoint would then be resolved to a property called 'my.endpoint' that is registered with the registry.

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

connector

public abstract String connector
Deprecated. 
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:
""

method

public abstract String method
Deprecated. 
The method to called on the bound interface. This argument can be omitted if there is only one method on the bound interface.

TODO not usre this is needed

Returns:
the method name to call or an empty string if it has not been set
Default:
""

id

public abstract String id
Deprecated. 
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:
""


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.