synchron = new Boolean[1];
if(mustReply == null)
mustReply = new Boolean[1];
if(_disposed) throw new DisposedException(
"java_remote_bridge(" + this + ").sendRequest - is disposed");
if(operation.equals("acquire")) acquire(); // keep this bridge alife
boolean goThroughThreadPool = false;
try {
synchronized(_outputStream) {
_iProtocol.writeRequest((String)object, TypeDescription.getTypeDescription(type), operation, ThreadPoolFactory.getThreadId(), params, synchron, mustReply);
goThroughThreadPool = synchron[0].booleanValue() && Thread.currentThread() != _messageDispatcher;
if(goThroughThreadPool) // prepare a queue for this thread in the threadpool
_iThreadPool.attach();
try {
_iProtocol.flush(new DataOutputStream(_outputStream));
_outputStream.flush();
}
catch(IOException iOException) {
DisposedException disposedException =
new DisposedException( iOException.getMessage() );
dispose(disposedException);
throw disposedException;
}
}