public interface EndpointService
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 |
lookup(EndpointPromise promise)
Called by the client each time it needs to make a decision about which endpoint
to attempt a connection to.
|
void |
onSuccess(Endpoint endpoint)
Called by the client when it has successfully established a connection to one of
the endpoints returned by this service.
|
void lookup(EndpointPromise promise)
When the operation completes the promise (supplied as an argument) is used to
notify the client of the outcome. If an endpoint is available it will be
supplied to the Promise.setSuccess(Object)
method. If no
endpoints are currently available, the client can be advised to wait for a
period of time before calling this method again using the EndpointPromise.setWait(long)
method. Indicating failure by calling the Promise.setFailure(Exception)
will cause the client to transition into stopped
state.
promise
- a promise that is to be completed when the endpoint service has
completed the lookup request.void onSuccess(Endpoint endpoint)
endpoint
- Copyright © 2015 International Business Machines Corporation. All rights reserved.