internal void StopChannelCore(WsChannel wsChannel, ChannelStopMode action, bool setInactive) { RetryOnHCONNError(() => { var request = _messageAgent.NewRequest(MQC.MQCMD_STOP_CHANNEL); request.AddParameter(MQC.MQCACH_CHANNEL_NAME, wsChannel.Name); int mode = MQC.MQMODE_QUIESCE; switch (action) { case ChannelStopMode.Force: mode = MQC.MQMODE_FORCE; break; case ChannelStopMode.Terminate: mode = MQC.MQMODE_TERMINATE; break; default: mode = MQC.MQMODE_QUIESCE; break; } request.AddParameter(MQC.MQIACF_MODE, mode); if (setInactive) { request.AddParameter(MQC.MQIACH_CHANNEL_STATUS, MQC.MQCHS_INACTIVE); } _messageAgent.Send(request); }); }
public void Stop(ChannelStopMode action = ChannelStopMode.Normal, bool setInactive = false) { try { ((WsQueueManager)QueueManager).StopChannelCore(this, action, setInactive); RefreshInfo(); } catch (MQException ibmEx) { if (ibmEx.ReasonCode == MQC.MQRCCF_CHANNEL_NOT_ACTIVE) { return; } throw ibmEx.ToMqException(AddExtraInfoToError); } }