public interface NetworkService
NonBlockingClient.create(com.ibm.mqlight.api.endpoint.EndpointService, com.ibm.mqlight.api.callback.CallbackService, com.ibm.mqlight.api.network.NetworkService, com.ibm.mqlight.api.timer.TimerService, com.google.gson.GsonBuilder, com.ibm.mqlight.api.ClientOptions, com.ibm.mqlight.api.NonBlockingClientListener, Object)
method.Modifier and Type | Method and Description |
---|---|
void |
connect(Endpoint endpoint,
NetworkListener listener,
Promise<NetworkChannel> promise)
Establish a network connection.
|
void connect(Endpoint endpoint, NetworkListener listener, Promise<NetworkChannel> promise)
endpoint
- provides information about the host, port, etc. to establish the network
connection to.listener
- a listener that will be notified of network connection related events.
The listener will only be used if the network connection is successfully
established.promise
- a promise to complete when the outcome of the network connection attempt is
established. If the network connection is successfully established then the
Promise.setSuccess(Object)
is passed an implementation of
NetworkChannel
that can be used to send data over the network connection.Copyright © 2015 International Business Machines Corporation. All rights reserved.