@Target(value=METHOD) @Retention(value=SOURCE) @Documented public @interface Connect
Connector
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.
int
,bool
,short
, etc.void
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.