public Exception readException( ApplicationException ae ) { // Note that the exception ID is present in both ae // and in the input stream from ae. The exception // reader must actually read the exception ID from // the stream. InputStream is = (InputStream)ae.getInputStream() ; String excName = ae.getId() ; int index = findDeclaredException( excName ) ; if (index < 0) { excName = is.read_string() ; Exception res = new UnexpectedException( excName ) ; res.initCause( ae ) ; return res ; } return rws[index].read( is ) ; }
/** * One way call of the remote method. */ public void sayHello() { InputStream in = null; try { // As we do not expect any response, the second // parameter is 'false'. OutputStream out = _request("sayHello", false); in = _invoke(out); } catch (ApplicationException ex) { in = ex.getInputStream(); throw new MARSHAL(ex.getId()); } catch (RemarshalException _rm) { sayHello(); } finally { _releaseReply(in); } }
/** * Set the field value. */ public void theField(int newTheField) { InputStream in = null; try { // The special name of operation instructs just to set // the field value rather than calling the method. OutputStream out = _request("_set_theField", true); out.write_long(newTheField); in = _invoke(out); } catch (ApplicationException ex) { in = ex.getInputStream(); throw new MARSHAL(ex.getId()); } catch (RemarshalException _rm) { theField(newTheField); } finally { _releaseReply(in); } }
/** {@inheritDoc} */ public void destroy() { InputStream input = null; try { OutputStream output = _request("destroy", true); input = _invoke(output); } catch (ApplicationException ex) { input = ex.getInputStream(); String id = ex.getId(); throw new MARSHAL(id); } catch (RemarshalException remarsh) { destroy(); } finally { _releaseReply(input); } }
/** {@inheritDoc} */ public Policy copy() { InputStream input = null; try { OutputStream output = _request("copy", true); input = _invoke(output); return PolicyHelper.read(input); } catch (ApplicationException ex) { input = ex.getInputStream(); String id = ex.getId(); throw new MARSHAL(id); } catch (RemarshalException remarsh) { return copy(); } finally { _releaseReply(input); } }
/** * Get the definition kind of the remote IDL type object. The method is * written following OMG specification, treating the typecode * as a read only attribute rather than a method. This means, * the operation name is "_get_def_kind". * * @return a definition kind, returned by remote IDL type object. */ public DefinitionKind def_kind() { InputStream in = null; try { OutputStream out = _request("_get_def_kind", true); in = _invoke(out); return DefinitionKindHelper.read(in); } catch (ApplicationException ex) { in = ex.getInputStream(); throw new org.omg.CORBA.MARSHAL(ex.getId()); } catch (RemarshalException rex) { return def_kind(); } finally { _releaseReply(in); } }
/** * Destroy the remote IDL type object. */ public void destroy() { InputStream in = null; try { OutputStream out = _request("destroy", true); in = _invoke(out); } catch (ApplicationException ex) { in = ex.getInputStream(); throw new org.omg.CORBA.MARSHAL(ex.getId()); } catch (RemarshalException rex) { destroy(); } finally { _releaseReply(in); } }
/** {@inheritDoc} */ public NamingContext new_context() { InputStream in = null; try { OutputStream out = _request("new_context", true); in = _invoke(out); NamingContext __result = NamingContextHelper.read(in); return __result; } catch (ApplicationException ex) { in = ex.getInputStream(); throw new MARSHAL(ex.getId()); } catch (RemarshalException remarsh) { return new_context(); } finally { _releaseReply(in); } }
/** {@inheritDoc} */ public void components_established(IORInfo info) { InputStream input = null; try { OutputStream output = _request("components_established", true); output.write_Object(info); input = _invoke(output); } catch (ApplicationException ex) { input = ex.getInputStream(); String id = ex.getId(); throw new MARSHAL(id); } catch (RemarshalException remarsh) { components_established(info); } finally { _releaseReply(input); } }
/** {@inheritDoc} */ public void establish_components(IORInfo info) { InputStream input = null; try { OutputStream output = _request("establish_components", true); output.write_Object(info); input = _invoke(output); } catch (ApplicationException ex) { input = ex.getInputStream(); String id = ex.getId(); throw new MARSHAL(id); } catch (RemarshalException remarsh) { establish_components(info); } finally { _releaseReply(input); } }