/** * Our implementation will not call this method. After setting your * manager to POA, it will call incarnate and etherialize directly. */ public OutputStream _invoke(String method, InputStream input, ResponseHandler handler ) throws SystemException { throw new NO_IMPLEMENT(); }
/** * We cannot invoke properly without having parameter info. * * @throws BAD_OPERATION, always. */ public OutputStream _invoke(String method, InputStream input, ResponseHandler handler ) { throw new BAD_OPERATION(servant + " is not an InvokeHandler."); }
/** * Forward the call to the wrapped object. */ public OutputStream _invoke(String method, InputStream input, ResponseHandler handler ) throws SystemException { org.omg.CORBA.portable.InputStream in = null; org.omg.CORBA.portable.OutputStream out = null; try { try { out = ref._request(method, true); // Transfer request information. int b; while ((b = input.read()) >= 0) { out.write(b); } in = ref._invoke(out); // Read the returned data. out = handler.createReply(); while ((b = in.read()) >= 0) { out.write(b); } } catch (IOException io_ex) { MARSHAL m = new MARSHAL(); m.minor = Minor.Forwarding; m.initCause(io_ex); throw m; } } catch (ApplicationException ex) { in = ex.getInputStream(); String _id = ex.getId(); throw new MARSHAL(_id, 5101, CompletionStatus.COMPLETED_NO); } catch (RemarshalException remarsh) { _invoke(method, input, handler); } finally { ref._releaseReply(in); } return out; }