@Target(value=METHOD) @Retention(value=SOURCE) @Documented public @interface Connect
ConnectionManagement scope as the responsible for creating
a connection. This method could have several parameters and them could contain annotations such as ConnectionKey or Password.
It is guaranteed that this method will be called before calling any message processor.
ConnectionException (and no other exceptions)
int,bool,short, etc.
void
Connect parameters are available in the config element (as occurs with Configurable fields),
and in the message processor whenever it is dragged into a flow when the ConnectionManagement
Class is also annotated with OverrideAtProcessors.In the last case specified fields override those that are set in the configuration element| Modifier and Type | Optional Element and Description |
|---|---|
ConnectStrategy |
strategy
Defines the strategy to be used when managing connections.
|
public abstract ConnectStrategy strategy
Defines the strategy to be used when managing connections. Two values are given out of the box.
ConnectStrategy.MULTIPLE_INSTANCES to be used when multiple connector instances can be used within the same key (like user name and password). This is intended for non thread safe environments. ConnectStrategy.SINGLE_INSTANCE to be used when only a single instance can be used within the same key (like user name and password). It is important to notice that the service client used here must be thread safeCopyright © 2010–2015 MuleSoft, Inc.. All rights reserved.