通道可以随时处于多种状态之一。一些状态也有子状态。通道可以从给定状态移动到其他状态。
下图显示了所有可能的通道状态的层次结构以及适用于每个通道状态的子状态。
Figure1
通道状态之间的流动
Figure2
Current and active
A channel is current if it is in any state other than inactive. A current channel is active unless it is in RETRYING, STOPPED, or STARTING state. When a channel is active, it is consuming resource and a process or thread is running. The seven possible states of an active channel (INITIALIZING, BINDING, SWITCHING, REQUESTING, RUNNING, PAUSED, or STOPPING) are highlighted in Figure 2.
An active channel can also show a substate giving more detail of exactly what the channel is doing. The substates for each state are shown in Figure 1.
- Current and active
The channel is “current” if it is in any state other than inactive. A current channel is “active” unless it is in RETRYING, STOPPED, or STARTING state. - Channel errors
Errors on channels cause the channel to stop further transmissions. If the channel is a sender or server, it goes to RETRY state because it is possible that the problem might clear itself. If it cannot go to RETRY state, the channel goes to STOPPED state.