@Override public void closed() { if (!_closeReceived) { throw new TransportException("connection aborted"); } }
@Override public ByteBuffer tail() { if (_tail_closed) throw new TransportException("tail closed"); return _inputBuffer; }
@Override public ByteBuffer tail() { if (_tail_closed) throw new TransportException("tail closed"); return _inputBuffer; }
@Override public ByteBuffer tail() { if (_tail_closed) throw new TransportException("tail closed"); return _inputBuffer; }
private static Method getMethod(Class klass, String name, Class<?> ... params) { if (klass == null) { return null; } try { return klass.getMethod(name, params); } catch (NoSuchMethodException e) { throw new TransportException(e); } }
private static Constructor getConstructor(Class klass, Class<?> ... params) { if (klass == null) { return null; } try { return klass.getConstructor(params); } catch (NoSuchMethodException e) { throw new TransportException(e); } }
@Override public ByteBuffer tail() { if (_tail_closed) { if (_parsingError != null) { throw new TransportException(_parsingError.getMessage()); } else { throw new TransportException("tail closed"); } } return _inputBuffer; }
@Override public ByteBuffer tail() { if (_tail_closed) { throw new TransportException("tail closed"); } if (_inputBuffer == null) { _inputBuffer = newWriteableBuffer(_inputBufferSize); } return _inputBuffer; }
@Override public ByteBuffer tail() { if (_tail_closed) { throw new TransportException("tail closed"); } if (_inputBuffer == null) { _inputBuffer = newWriteableBuffer(_inputBufferSize); } return _inputBuffer; }
@Override public void process() throws TransportException { if (_tail_closed) throw new TransportException("tail closed"); _inputBuffer.flip(); try { unwrapInput(); } catch (SSLException e) { _logger.log(Level.WARNING, e.getMessage()); _inputBuffer.position(_inputBuffer.limit()); _tail_closed = true; } finally { _inputBuffer.compact(); } }
@Override public void checkIsOk() { if (!isOk()) { Exception e = getException(); if (e != null) { throw new TransportException(e); } else { throw new TransportException(getErrorDescription()); } } } }
@Override public int pending() { initTransportWrapperOnFirstIO(); if (_initException == null) { return _transportWrapper.pending(); } else { throw new TransportException(_initException); } }
@Override public void process() throws TransportException { initTransportWrapperOnFirstIO(); if (_initException == null) { _transportWrapper.process(); } else { throw new TransportException(_initException); } }
@Override public void checkIsOk() { if (!isOk()) { Exception e = getException(); if (e != null) { throw new TransportException(e); } else { throw new TransportException(getErrorDescription()); } } } }
@Override public int pending() { initTransportWrapperOnFirstIO(); if (_initException == null) { return _transportWrapper.pending(); } else { throw new TransportException(_initException); } }
@Override public void checkIsOk() { if (!isOk()) { Exception e = getException(); if (e != null) { throw new TransportException(e); } else { throw new TransportException(getErrorDescription()); } } } }
@Override public void process() throws TransportException { initTransportWrapperOnFirstIO(); if (_initException == null) { _transportWrapper.process(); } else { throw new TransportException(_initException); } }
/** * This method is public as it is used by Python layer. * @see org.apache.qpid.proton.engine.Transport#input(byte[], int, int) */ public TransportResult oldApiCheckStateBeforeInput(int inputLength) { _lastTransportResult.checkIsOk(); if(inputLength == 0) { if(_connectionEndpoint == null || _connectionEndpoint.getRemoteState() != EndpointState.CLOSED) { return TransportResultFactory.error(new TransportException("Unexpected EOS when remote connection not closed: connection aborted")); } } return TransportResultFactory.ok(); }
/** * This method is public as it is used by Python layer. * @see Transport#input(byte[], int, int) */ public TransportResult oldApiCheckStateBeforeInput(int inputLength) { _lastTransportResult.checkIsOk(); if(inputLength == 0) { if(_connectionEndpoint == null || _connectionEndpoint.getRemoteState() != EndpointState.CLOSED) { return TransportResultFactory.error(new TransportException("Unexpected EOS when remote connection not closed: connection aborted")); } } return TransportResultFactory.ok(); }
/** * This method is public as it is used by Python layer. * @see org.apache.qpid.proton.engine.Transport#input(byte[], int, int) */ public TransportResult oldApiCheckStateBeforeInput(int inputLength) { _lastTransportResult.checkIsOk(); if(inputLength == 0) { if(_connectionEndpoint == null || _connectionEndpoint.getRemoteState() != EndpointState.CLOSED) { return TransportResultFactory.error(new TransportException("Unexpected EOS when remote connection not closed: connection aborted")); } } return TransportResultFactory.ok(); }