AsyncChannel
, Channel
, ChannelListenerSupport
ClusterProtocol
, Protocol
AbstractClusterChannel
, BasicChatProtocol
, CallbackProtocol
, ClientChannel
, ClusterProtocolImpl
, ConfServerProtocol
, EmailProtocol
, EspClusterProtocol
, EspEmailClusterProtocol
, EspEmailProtocol
, ExternalServiceProtocol
, FlexChatClusterProtocol
, FlexChatProtocol
, InteractionServerProtocol
, LcaUdpHeartbeatInternalProtocol
, LocalControlAgentProtocol
, MessageServerProtocol
, OptionalRegistrationChannel
, OutboundServerProtocol
, RoutingServerProtocol
, SolutionControlServerProtocol
, StatServerProtocol
, TServerProtocol
, UcsClusterProtocol
, UniversalContactServerProtocol
, UrsCustomProtocol
, WebmediaChannel
public interface RequestChannel extends Channel
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
Modifier and Type | Method | Description |
---|---|---|
RequestFuture |
beginRequest(Message message) |
Starts request and exits.
|
Message |
endRequest(RequestFuture future) |
Tries to finish request started with
beginRequest() . |
Message |
endRequest(RequestFuture future,
long timeout) |
Tries to finish request started with
beginRequest() . |
boolean |
getCopyResponse() |
Is response to
request() copied to receive queue. |
Message |
request(Message message) |
Sends the message and waitResponse for response.
|
Message |
request(Message message,
long timeout) |
Sends the message and waitResponse for response or while specified timeout
is elapsed.
|
<A> void |
requestAsync(Message message,
A attachment,
CompletionHandler<Message,? super A> handler) |
Starts request and exits.
|
<A> void |
requestAsync(Message message,
A attachment,
CompletionHandler<Message,? super A> handler,
long timeout) |
Starts request and exits.
|
void |
setCopyResponse(boolean copyResponse) |
Is response to
request() copied to receive queue. |
beginClose, beginOpen, getState
close, close, getTimeout, open, open, setTimeout
addChannelListener, removeChannelListener
Message request(Message message) throws ProtocolException, java.lang.IllegalStateException
message
- Message to sendjava.lang.NullPointerException
- if request message is nulljava.lang.IllegalStateException
- if channel is not in an appropriate state
(e.g. closed)ProtocolException
- if some protocol problems occurredrequest(Message, long)
Message request(Message message, long timeout) throws ProtocolException, java.lang.IllegalStateException
message
- Message to sendtimeout
- timeout in msjava.lang.NullPointerException
- if request message is nulljava.lang.IllegalStateException
- if channel is not in an appropriate state
(e.g. closed)ProtocolException
- if some protocol problems occurredRequestFuture beginRequest(Message message) throws ProtocolException, java.lang.IllegalStateException
endRequest(RequestFuture)
method.message
- message to request withjava.lang.NullPointerException
- if request message is nulljava.lang.IllegalStateException
- if channel is in inappropriate state to
execute the requestProtocolException
- if sending of the request failsChannel.setTimeout(long)
,
requestAsync(Message, Object, CompletionHandler)
,
endRequest(RequestFuture)
<A> void requestAsync(Message message, A attachment, CompletionHandler<Message,? super A> handler) throws ProtocolException, java.lang.IllegalStateException
A
- user callback attachment parameter typemessage
- message to request withattachment
- user defined parameter for the "callback"handler
- user defined "callback" interface for notification
about server responsejava.lang.NullPointerException
- if request message is nulljava.lang.IllegalArgumentException
- if callback is not null,
but protocol has no positive timeout setjava.lang.IllegalStateException
- if channel is in inappropriate state to
execute the requestProtocolException
- if sending of the request failsChannel.setTimeout(long)
,
requestAsync(Message, Object, CompletionHandler, long)
<A> void requestAsync(Message message, A attachment, CompletionHandler<Message,? super A> handler, long timeout) throws ProtocolException, java.lang.IllegalStateException
Message request = ...;
ReqContext ctx = ...;
CompletionHandler<Message, ReqContext> rqCallback =
new CompletionHandler<Message, ReqContext>() {
public void completed(
final Message response,
final ReqContext ctx) {
// handle the response
}
public void failed(
final Throwable throwable,
final ReqContext ctx) {
// handle the request failure
}
};
protocol.requestAsync(request, ctx, rqCallback, timeout);
A
- user callback attachment parameter typemessage
- message to request withattachment
- user defined parameter for the "callback"handler
- user defined "callback" interface for notification
about server responsetimeout
- timeout waiting for server response before request invalidationjava.lang.NullPointerException
- if request message is nulljava.lang.IllegalArgumentException
- if callback is not null,
but provided timeout is not positive valuejava.lang.IllegalStateException
- if channel is in inappropriate state to
execute the requestProtocolException
- if sending of the request failsMessage endRequest(RequestFuture future) throws ProtocolException
beginRequest()
.future
- future object obtained from beginRequest()
ProtocolException
- if there are protocol related problemsbeginRequest(Message)
Message endRequest(RequestFuture future, long timeout) throws ProtocolException
beginRequest()
.future
- future object obtained from beginRequest()
timeout
- timeout to waitResponse for responseProtocolException
- if there are protocol related problemsbeginRequest(Message)
boolean getCopyResponse()
request()
copied to receive queue.void setCopyResponse(boolean copyResponse)
request()
copied to receive queue.copyResponse
- true if response goes to receive queueSend comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.