public void closeSession(AMQSessionModel session, AMQConstant cause, String message) throws AMQException
{
closeChannel((Integer)session.getID());
MethodRegistry methodRegistry = getMethodRegistry();
ChannelCloseBody responseBody =
methodRegistry.createChannelCloseBody(
cause.getCode(),
new AMQShortString(message),
0,0);
writeFrame(responseBody.generateFrame((Integer)session.getID()));