Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.protocol
Interface Channel

All Superinterfaces:
AsyncChannel, ChannelListenerSupport
All Known Subinterfaces:
ClusterProtocol, InputChannel, OutputChannel, Protocol, RequestChannel, ResponseChannel
All Known Implementing Classes:
AbstractChannel, AbstractClusterChannel, BasicChatProtocol, CallbackClientChannelHandler, CallbackProtocol, CallbackProtocolListener, ChatClientChannelHandler, ChatProtocolsListener, ClientChannel, ClientChannelHandler, ClusterProtocolImpl, ConfServerClientChannelHandler, ConfServerProtocol, ConfServerProtocolListener, DuplexChannel, EmailClientChannelHandler, EmailProtocol, EmailProtocolListener, EspClusterProtocol, EspEmailClientChannelHandler, EspEmailClusterProtocol, EspEmailProtocol, EspEmailProtocolListener, ExternalServiceClientChannelHandler, ExternalServiceProtocol, ExternalServiceProtocolListener, FlexChatClusterProtocol, FlexChatProtocol, InteractionServerClientChannelHandler, InteractionServerProtocol, InteractionServerProtocolListener, LcaUdpHeartbeatInternalProtocol, LocalControlAgentProtocol, MessageServerProtocol, OptionalRegistrationChannel, OutboundServerProtocol, RoutingServerProtocol, ServerChannel, SolutionControlServerProtocol, StatServerProtocol, TServerProtocol, UcsClusterProtocol, UniversalContactServerClientChannelHandler, UniversalContactServerProtocol, UniversalContactServerProtocolListener, UrsCustomProtocol, UrsCustomProtocolListener, WebmediaChannel, WebMediaClientChannelHandler

public interface Channel
extends AsyncChannel

Communication channel with synchronous opening and closing. It will waitResponse for some time for connection state change in its sync methods.

Timeout can be set to following values:


Field Summary
static long DEFAULT_TIMEOUT
           
static long INFINITE_TIMEOUT
           
 
Method Summary
 void close()
          Closes channel synchronously.
 void close(long timeout)
          Closes channel synchronously with given timeout.
 long getTimeout()
          Returns default timeout for synchronous operations on channel.
 void open()
          Opens the channel by opening underlying connection including protocol specific handshake procedure.
This method will block until connection is opened or detects an error condition, possibly forever.
 void open(long timeout)
          Opens the channel by opening underlying connection including protocol specific handshake procedure using specified protocol timeout value.
Timeout can be set to following values: positive value - time in ms.
 void setTimeout(long timeout)
          Sets default timeout for synchronous operations on channel.
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel
beginClose, beginOpen, getState
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport
addChannelListener, removeChannelListener
 

Field Detail

INFINITE_TIMEOUT

static final long INFINITE_TIMEOUT
See Also:
Constant Field Values

DEFAULT_TIMEOUT

static final long DEFAULT_TIMEOUT
See Also:
Constant Field Values
Method Detail

open

void open()
          throws RegistrationException,
                 ProtocolException,
                 java.lang.IllegalStateException,
                 java.lang.InterruptedException
Opens the channel by opening underlying connection including protocol specific handshake procedure.
This method will block until connection is opened or detects an error condition, possibly forever. Use open(long) method to use custom timeout or change the protocol timeout value with setTimeout(long) before opening.

Throws:
RegistrationException - if there is an error related to registration procedure like server error about wrong client name, user password, etc
ProtocolException - if there is any problem related to the connection open
java.lang.IllegalStateException - if channel is not in Closed state. Actually, in current Platform SDK implementation, the ChannelNotClosedException which is subclass of IllegalStateException can be thrown.
java.lang.InterruptedException
See Also:
setTimeout(long), open(long)

close

void close()
           throws ProtocolException,
                  java.lang.IllegalStateException,
                  java.lang.InterruptedException
Closes channel synchronously.

Throws:
java.lang.InterruptedException - in case the close operation was interrupted.
ProtocolException - if there is any problem related to the connection close
java.lang.IllegalStateException - exception will not be thrown in current implementation.

open

void open(long timeout)
          throws RegistrationException,
                 ProtocolException,
                 java.lang.IllegalStateException,
                 java.lang.InterruptedException
Opens the channel by opening underlying connection including protocol specific handshake procedure using specified protocol timeout value.
Timeout can be set to following values:

Parameters:
timeout - time to waitResponse for the connection
Throws:
RegistrationException - if there is an error related to registration procedure like server error about wrong client name, user password, etc
ProtocolException - if there is any problem related to the connection open
java.lang.IllegalStateException - if channel is not in Closed state
java.lang.InterruptedException
See Also:
open()

close

void close(long timeout)
           throws ProtocolException,
                  java.lang.IllegalStateException,
                  java.lang.InterruptedException
Closes channel synchronously with given timeout.

Throws:
java.lang.InterruptedException - in case the close operation was interrupted.
ProtocolException - if there is any problem related to the connection close
java.lang.IllegalStateException - exception will not be thrown in current implementation.

setTimeout

void setTimeout(long timeout)
Sets default timeout for synchronous operations on channel. Please see class description for timeout values meaning.

Parameters:
timeout - timeout in milliseconds

getTimeout

long getTimeout()
Returns default timeout for synchronous operations on channel. Please see class description for timeout values meaning.

Returns:
timeout

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.