This is probably closer to a bug report, but it's a bug
against the BEEP protocol, so I'll phrase it as a
feature request. According to RFC3080 Section 2.3.1.3,
a beep peer is allowed to reject a request to close a
channel by sending an err response.
Session.receiveCloseChannel() doesn't leave this
possibility open -- it tells the appropriate
StartChannelListener that it's being shutdown, then
always sets channel state to STATE_CLOSING and sends an
<ok /> response. There should either be an extension
to StartChannelListener.closeChannel() to return an
identifier marking success or failure, or a special
handling of CloseChannelExceptions around the call to
allow for sending an err response explaining the reason
for denying the channel close. If you have a preferred
fix, let me know and I'll implement it and submit a
patch.
Dave