public class SocketOperations extends Object
| Constructor and Description |
|---|
SocketOperations() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<?,?> |
send(RequesterConnection connection,
RequesterConfig config,
Object content,
String outputEncoding,
boolean hasResponse,
org.mule.runtime.api.message.Message muleMessage)
Sends the data using the client associated to the
RequesterConnection. |
@OutputResolver(output=SocketMetadataResolver.class) public org.mule.runtime.extension.api.runtime.operation.Result<?,?> send(@Connection RequesterConnection connection, @UseConfig RequesterConfig config, @Content Object content, @Optional @Summary(value="Encoding to use when the data to serialize is of String type") String outputEncoding, @MetadataKeyId boolean hasResponse, org.mule.runtime.api.message.Message muleMessage) throws org.mule.runtime.api.connection.ConnectionException, IOException
RequesterConnection.
If hasResponse is set, the operation blocks until a response is received or the timeout is met, in which case the
operation will return a Message with null payload.
content - data that will be serialized and sent through the socket.hasResponse - whether the operation should await for a response or notoutputEncoding - encoding that will be used to serialize the data if its type is String.muleMessage - if there is no response expected, the outcome of the operation will be the same Message as the
input.org.mule.runtime.api.connection.ConnectionException - if the connection couldn't be established, if the remote host was unavailable.IOExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.