public interface Channel
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the channel and frees up all its resources.
|
void |
connect()
Connects the
Channel to the underlying transport so that it
can send outbound messages. |
Channel.State |
getState()
Get current
Channel.State of this channel. |
void |
init()
Initializes the
Channel by allocating necessary resources,
creating pools, etc. |
void |
start()
Starts the channel, so that it can receive data through its underlying
transport.
|
void |
stop() |
void init()
Channel
by allocating necessary resources,
creating pools, etc.
Only valid on an uninitialized or closed channel. After this call, you
will be able to connect
or close
the
Channel
.
java.lang.Exception
- Exception when initialization failedChannel.connect()
,
Channel.close()
void connect()
Channel
to the underlying transport so that it
can send outbound messages. This in turn could mean connecting to the
server etc. Once successfully connected, the connections could be added
to the pool.
Only valid on an initialized channel. After this call, you will be able
to start
or close
the Channel
.
Do not start receiving data data here.
The implementor must connect all the destinations of this Channel
.
java.lang.Exception
- encountered exceptionDestination.connect()
,
Channel.init()
,
Channel.close()
void start()
Only valid on a connected channel. After this call, you will be able to
stop
and close
the Channel
.
The implementor must start all the bound destinations of this Channel
.
java.lang.Exception
- encountered exceptionDestination.start()
,
Channel.connect()
,
Channel.close()
void stop()
void close()
Only valid on a started channel. After this call, you will be able to
init
the Channel
.
The implementor must close all the destinations of this Channel
.
java.lang.Exception
- encountered exceptionChannel.init()
Channel.State getState()
Channel.State
of this channel.