/** This is called from the ORB after the DynamicImplementation.invoke * returns. Here we marshal the return value and inout/out params. */ public void marshalReplyParams(OutputStream os) { // marshal the operation return value _resultAny.write_value(os); // marshal the inouts/outs NamedValue arg = null; for (int i=0; i < _arguments.count() ; i++) { try { arg = _arguments.item(i); } catch (Bounds e) {} if ((arg.flags() == org.omg.CORBA.ARG_OUT.value) || (arg.flags() == org.omg.CORBA.ARG_INOUT.value)) { arg.value().write_value(os); } } }
/** * See RequestInfoImpl for javadoc. */ public Any result (){ checkAccess( MID_RESULT ); if( cachedResult == null ) { if( request == null ) { throw stdWrapper.piOperationNotSupported5() ; } // Get the result from the DII request data. NamedValue nvResult = request.result( ); if( nvResult == null ) { throw wrapper.piDiiResultIsNull() ; } cachedResult = nvResult.value(); } // Good citizen: In the interest of efficiency, we assume that // interceptors will not modify the contents of the result Any. // Otherwise, we would need to create a deep copy of the Any. return cachedResult; }
/** * Create the request for the local call */ public Request create_request(org.omg.CORBA.Object target, Context context, String operation, NVList parameters, NamedValue returns ) { if (orb instanceof OrbFunctional) { ((OrbFunctional) orb).ensureRunning(); } gnuRequest g = new gnuRequest(); g.setORB(orb); g.setOperation(operation); g.setIor(ior); g.m_target = target; g.ctx(context); g.set_args(parameters); if (returns != null) g.set_result(returns); return g; }
/** * Create the request for the local call. */ public Request create_request(org.omg.CORBA.Object target, Context context, String operation, NVList parameters, NamedValue returns, ExceptionList exceptions, ContextList ctx_list ) { if (orb instanceof OrbFunctional) { ((OrbFunctional) orb).ensureRunning(); } gnuRequest g = new gnuRequest(); g.setORB(orb); g.setOperation(operation); g.setIor(ior); g.m_target = target; g.ctx(context); g.set_args(parameters); g.set_exceptions(exceptions); g.set_context_list(ctx_list); if (returns != null) g.set_result(returns); return g; }
/** * Creates the request to invoke the method on this object. * * @param target the object, for that the operation must be invoked. * @param context context (null allowed) * @param operation the method name * @param parameters the method parameters * @param returns the return value holder * * @return the created request. */ public Request create_request(org.omg.CORBA.Object target, Context context, String operation, NVList parameters, NamedValue returns ) { gnuRequest request = getRequestInstance(target); request.setIor(getIor()); request.set_target(target); request.setOperation(operation); request.set_args(parameters); request.m_context = context; request.set_result(returns); request.setORB(orb); return request; }
/** * Creates the request to invoke the method on this object. * * @param target the object, for that the operation must be invoked. * @param context context (null allowed) * @param operation the method name * @param parameters the method parameters * @param returns the return value holder * * @return the created request. */ public Request create_request(org.omg.CORBA.Object target, Context context, String operation, NVList parameters, NamedValue returns, ExceptionList exceptions, ContextList ctx_list ) { gnuRequest request = getRequestInstance(target); request.setIor(ior); request.set_target(target); request.setOperation(operation); request.set_args(parameters); request.m_context = context; request.set_result(returns); request.set_exceptions(exceptions); request.set_context_list(ctx_list); request.setORB(orb); return request; }
public static void assignOutArguments(NVList from_list, NVList to_list, boolean wrap_anys) { int length = to_list.count(); if (length < from_list.count()) throw new MARSHAL("Invalid number of out arguments.", 0, CompletionStatus.COMPLETED_NO); NamedValue to_nam_val = null; try { for (int i = 0; i < length; i++) { to_nam_val = to_list.item(i); if (to_nam_val.flags() != ARG_IN.value) AnyImpl.assignValue(from_list.item(i).value(), to_nam_val.value(), wrap_anys); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public static void assignInArguments(NVList from_list, NVList to_list, boolean wrap_anys) { int length = to_list.count(); if (length < from_list.count()) throw new MARSHAL("Invalid number of out arguments.", 0, CompletionStatus.COMPLETED_NO); NamedValue to_nam_val = null; try { for (int i = 0; i < length; i++) { to_nam_val = to_list.item(i); if (to_nam_val.flags() != ARG_OUT.value) AnyImpl.assignValue(from_list.item(i).value(), to_nam_val.value(), wrap_anys); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public static void readOutParams(NVList list, InputStream input) { if (list == null) return; int length = list.count(); NamedValue nam_val = null; try { for (int i = 0; i < length; i++) { nam_val = list.item(i); if (nam_val.flags() != ARG_IN.value) nam_val.value().read_value(input, nam_val.value().type()); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public static void writeOutParams(NVList list, OutputStream output) { if (list == null) return; int length = list.count(); NamedValue nam_val = null; try { for (int i = 0; i < length; i++) { nam_val = list.item(i); if (nam_val.flags() != ARG_IN.value) nam_val.value().write_value(output); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }