boolean result = false;
if (!_hasSessionFilter || !_isServer)
result = (_outputStreamEncoder != null && _outputStreamEncoder.getBuffer() != null && _outputStreamEncoder.getBuffer().getContext() != null && _outputStreamEncoder.getBuffer().getContext().getChannel().isConnected());
else if (_outputStreamEncoder != null && _outputStreamEncoder.getBuffer() != null && _outputStreamEncoder.getBuffer().getContext() != null)
{
ServerSessionFilter session = ServerSessionFilter.getServerSessionFilter(_outputStreamEncoder.getBuffer().getContext());
result = session == null || session.isValid();
}
return result;
}