/** * 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; }
/** * Set the argument list. This field is initialised as empty non null instance * by default, so the method is only used in cases when the direct replacement * is desired. * * @param a_args the argument list. */ public void set_args(NVList a_args) { if (a_args instanceof gnuNVList) m_args = (gnuNVList) a_args; else { try { // In case if this is another implementation of the NVList. m_args.list.clear(); for (int i = 0; i < a_args.count(); i++) { m_args.add(a_args.item(i)); } } catch (Bounds ex) { Unexpected.error(ex); } } }
public void set_values(org.omg.CORBA.NVList values) { if (values == null) { throw new BAD_PARAM("Null NVList reference", 0, CompletionStatus.COMPLETED_NO); } m_values = new NVListImpl(m_orb); int list_size = values.count(); try { for (int i = 0; i < list_size; i++) { set_one_value(values.item(i).name(), values.item(i).value()); } } catch (Bounds bds) {} }
protected void insertArguments(TIDORB orb, ServerRequestImpl request) { reset(); m_request_id = request.getId(); m_reply_status = ReplyStatusType.NO_EXCEPTION; createMessageBufferOutput(orb); Any result = request.getResult(); if (result != null) result.write_value(m_message_buffer_out); NVList list = request.getParameters(); if (list != null) NVListImpl.writeOutParams(list, m_message_buffer_out); m_message_completed = true; }
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"); } }
public static void readInParams(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_OUT.value) nam_val.value().read_value(input, nam_val.value().type()); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public static void writeInParams(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_OUT.value) nam_val.value().write_value(output); } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public static void setOutParamsAsIn(NVList list, RequestImpl replyHandlerRequest) { 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) { org.omg.CORBA.Any $arg = replyHandlerRequest.add_named_in_arg(nam_val.name()); $arg.type(nam_val.value().type()); } } } catch (Bounds bds) { throw new BAD_PARAM("Bad NVList"); } }
public void arguments(NVList args) { if (_paramsCalled) throw _wrapper.argumentsCalledMultiple() ; if (_exceptionSet) throw _wrapper.argumentsCalledAfterException() ; if (args == null ) throw _wrapper.argumentsCalledNullArgs() ; _paramsCalled = true; NamedValue arg = null; for (int i=0; i < args.count() ; i++) { try { arg = args.item(i); } catch (Bounds e) { throw _wrapper.boundsCannotOccur(e) ; } try { if ((arg.flags() == org.omg.CORBA.ARG_IN.value) || (arg.flags() == org.omg.CORBA.ARG_INOUT.value)) { // unmarshal the value into the Any arg.value().read_value(_ins, arg.value().type()); } } catch ( Exception ex ) { throw _wrapper.badArgumentsNvlist( ex ) ; } } // hang on to the NVList for marshaling the result _arguments = args; _orb.getPIHandler().setServerPIInfo( _arguments ); _orb.getPIHandler().invokeServerPIIntermediatePoint(); }
public Request create_request(org.omg.CORBA.Object obj, Context ctx, String operation, NVList arg_list, NamedValue result) { return new RequestImpl(orb, obj, ctx, operation, arg_list, result, null, null); }
public Request create_request(org.omg.CORBA.Object obj, Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exclist, ContextList ctxlist) { return new RequestImpl(orb, obj, ctx, operation, arg_list, result, exclist, ctxlist); }
/** * Internal utility method to convert an NVList into a PI Parameter[] */ protected Parameter[] nvListToParameterArray( NVList parNVList ) { // _REVISIT_ This utility method should probably be doing a deep // copy so interceptor can't accidentally change the arguments. int count = parNVList.count(); Parameter[] plist = new Parameter[count]; try { for( int i = 0; i < count; i++ ) { Parameter p = new Parameter(); plist[i] = p; NamedValue nv = parNVList.item( i ); plist[i].argument = nv.value(); // ParameterMode spec can be found in 99-10-07.pdf // Section:10.5.22 // nv.flags spec can be found in 99-10-07.pdf // Section 7.1.1 // nv.flags has ARG_IN as 1, ARG_OUT as 2 and ARG_INOUT as 3 // To convert this into enum PARAM_IN, PARAM_OUT and // PARAM_INOUT the value is subtracted by 1. plist[i].mode = ParameterMode.from_int( nv.flags() - 1 ); } } catch ( Exception e ) { throw wrapper.exceptionInArguments( e ) ; } return plist; }
public void setServerPIInfo( NVList arguments ) { if( !hasServerInterceptors ) return; ServerRequestInfoImpl info = peekServerRequestInfoImplStack(); info.setDSIArguments( arguments ); }