public synchronized Any add_in_arg() { return _arguments.add(org.omg.CORBA.ARG_IN.value).value(); }
public synchronized Any add_named_out_arg(String name) { return _arguments.add_item(name, org.omg.CORBA.ARG_OUT.value).value(); }
/** 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); } } }
private final NVList prepareResponse(Message mesg) { try { final Property[] _props = mesg.toTypedEvent(); final NVList _args = getORB().create_list(_props.length - 1); // start at index 1 here. index 0 contains the operation name for (int x = 1; x < _props.length; ++x) { _args.add_value(_props[x].name, _props[x].value, ARG_OUT.value); } return _args; } catch (NoTranslationException e) { // cannot happen here // as there are no nontranslatable Messages queued. throw new RuntimeException(); } }
if (request.arguments() != null && request.arguments().count() >= 1)
public final void setRequest(org.jacorb.orb.dii.Request request) { arguments = new org.omg.Dynamic.Parameter[request.arguments.count()]; for (int i = 0; i < arguments.length; i++) { try { NamedValue value = request.arguments.item(i); ParameterMode mode = null; if (value.flags() == ARG_IN.value) { mode = ParameterMode.PARAM_IN; } else if (value.flags() == ARG_OUT.value) { mode = ParameterMode.PARAM_OUT; } else if (value.flags() == ARG_INOUT.value) { mode = ParameterMode.PARAM_INOUT; } arguments[i] = new org.omg.Dynamic.Parameter(value.value(), mode); } catch (Exception e) { logger.debug("unexpected exception", e); } } //exceptions will be set when available }
private void prepareInvalidResponse(Map map, OperationDescription operation) throws InconsistentTypeCode { final NVList _expectedParams = getORB().create_list(operation.parameters.length); for (int x = 0; x < operation.parameters.length; ++x) { final DynAny _dynAny = dynAnyFactory_ .create_dyn_any_from_type_code(operation.parameters[x].type); _expectedParams .add_value(operation.parameters[x].name, _dynAny.to_any(), ARG_OUT.value); } map.put(operation.name, _expectedParams); }
public synchronized Any add_named_in_arg(String name) { return _arguments.add_item(name, org.omg.CORBA.ARG_IN.value).value(); }
public synchronized Any add_in_arg() { return _arguments.add(org.omg.CORBA.ARG_IN.value).value(); }
/** * 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 synchronized Any add_named_out_arg(String name) { return _arguments.add_item(name, org.omg.CORBA.ARG_OUT.value).value(); }
public synchronized Any add_inout_arg() { return _arguments.add(org.omg.CORBA.ARG_INOUT.value).value(); }
private NVList getExpectedParamList(String operation) { final OperationDescription _operation = getOperationDescription(operation); final NVList _expectedParams = getORB().create_list(_operation.parameters.length); for (int x = 0; x < _operation.parameters.length; ++x) { Any _value = getORB().create_any(); _value.type(_operation.parameters[x].type); _expectedParams.add_value(_operation.parameters[x].name, _value, ParameterMode._PARAM_IN); } return _expectedParams; }
public void set_values(org.omg.CORBA.NVList values) { // // Create new, empty list // values_.clear(); // // Copy named values // for (int i = 0; i < values.count(); i++) { org.omg.CORBA.NamedValue nv = null; try { nv = values.item(i); } catch (org.omg.CORBA.Bounds ex) { org.apache.yoko.orb.OB.Assert._OB_assert(ex); } String s = null; try { s = nv.value().extract_string(); } catch (org.omg.CORBA.SystemException ex) { throw new org.omg.CORBA.BAD_TYPECODE( org.apache.yoko.orb.OB.MinorCodes .describeBadTypecode(org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType), org.apache.yoko.orb.OB.MinorCodes.MinorInvalidPropertyType, CompletionStatus.COMPLETED_NO); } if (nv.flags() != 0) { throw new org.omg.CORBA.INV_FLAG("Unsupported named value flag"); } values_.put(nv.name(), s); } }
public synchronized Any add_named_inout_arg(String name) { return _arguments.add_item(name, org.omg.CORBA.ARG_INOUT.value).value(); }
public synchronized Any add_inout_arg() { return _arguments.add(org.omg.CORBA.ARG_INOUT.value).value(); }
public static NVList nvListFromStreamables(ORB orb, CorbaStreamable[] streamables) { NVList list = null; if (streamables != null && streamables.length > 0) { list = orb.create_list(streamables.length); for (int i = 0; i < streamables.length; ++i) { Any value = orb.create_any(); value.insert_Streamable(streamables[i]); list.add_value(streamables[i].getName(), value, streamables[i].getMode()); } } else { list = orb.create_list(0); } return list; }