com.genesyslab.platform.commons.protocol
Interface Channel
- All Superinterfaces:
- AsyncChannel, ChannelListenerSupport
- All Known Subinterfaces:
- InputChannel, OutputChannel, Protocol, RequestChannel, ResponseChannel
- All Known Implementing Classes:
- AbstractChannel, ClientChannel, DuplexChannel, ServerChannel
- 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:
- positive value - time in ms. to waitResponse
- 0 - do not waitResponse, return immediately
- negative value - waitResponse forever
INFINITE_TIMEOUT
public static final long INFINITE_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
open
public void open()
throws ProtocolException,
java.lang.InterruptedException,
java.lang.IllegalStateException
- Throws:
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
close
public void close()
throws ProtocolException,
java.lang.InterruptedException,
java.lang.IllegalStateException
- Throws:
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
open
public void open(long timeout)
throws ProtocolException,
java.lang.InterruptedException,
java.lang.IllegalStateException
- Throws:
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
close
public void close(long timeout)
throws ProtocolException,
java.lang.InterruptedException,
java.lang.IllegalStateException
- Throws:
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
setTimeout
public void setTimeout(long timeout)
- Set timeout for long operations.
Please see class description for timeout values meaning.
- Parameters:
timeout
- timeout in milliseconds
getTimeout
public long getTimeout()
- Return timeout.
Please see class description for timeout values meaning.
- Returns:
- timeout
Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.