public SshMessage nextMessage(MessageObserver observer, long timeout)
			throws SshException, EOFException {

		try {
			SshMessage msg = manager.nextMessage(channel, observer, timeout);
			if (Log.isDebugEnabled()) {
				if (verbose) {
					Log.debug(this, "got managers next message");
				}
			}

			if (msg != null) {
				synchronized (header) {

					if (stickyMessageObserver.wantsNotification(msg)) {
						return msg;
					}

					remove(msg);
					return msg;
				}
			}
		} catch (InterruptedException ex) {
			throw new SshException("The thread was interrupted",
					SshException.INTERNAL_ERROR);
		}

		throw new EOFException(
				"The required message could not be found in the message store");
	}
public SshMessage nextMessage ( MessageObserver observer , long timeout ) throws SshException , EOFException { try { SshMessage msg = manager . nextMessage ( channel , observer , timeout ) ; if ( Log . isDebugEnabled ( ) ) { if ( verbose ) { Log . debug ( this , "got managers next message" ) ; } } if ( msg != null ) { synchronized ( header ) { if ( stickyMessageObserver . wantsNotification ( msg ) ) { return msg ; } remove ( msg ) ; return msg ; } } } catch ( InterruptedException ex ) { throw new SshException ( "The thread was interrupted" , SshException . INTERNAL_ERROR ) ; } throw new EOFException ( "The required message could not be found in the message store" ) ; }
@param messagefilter
@param timeout
@return SshMessage
@throws IOException
@throws InterruptedIOException