本文整理汇总了Java中org.omg.CORBA.NamedValue.flags方法的典型用法代码示例。如果您正苦于以下问题:Java NamedValue.flags方法的具体用法?Java NamedValue.flags怎么用?Java NamedValue.flags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.NamedValue
的用法示例。
在下文中一共展示了NamedValue.flags方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: marshalReplyParams
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
/** 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);
}
}
}
示例2: assignOutArguments
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例3: assignInArguments
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例4: readOutParams
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例5: writeOutParams
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例6: readInParams
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例7: writeInParams
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例8: setOutParamsAsIn
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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");
}
}
示例9: unmarshalReply
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
public void unmarshalReply(InputStream is)
{
// First unmarshal the return value if it is not void
if ( _result != null ) {
Any returnAny = _result.value();
TypeCode returnType = returnAny.type();
if ( returnType.kind().value() != TCKind._tk_void )
returnAny.read_value(is, returnType);
}
// Now unmarshal the out/inout args
try {
for ( int i=0; i<_arguments.count() ; i++) {
NamedValue nv = _arguments.item(i);
switch( nv.flags() ) {
case ARG_IN.value:
break;
case ARG_OUT.value:
case ARG_INOUT.value:
Any any = nv.value();
any.read_value(is, any.type());
break;
}
}
}
catch ( org.omg.CORBA.Bounds ex ) {
// Cannot happen since we only iterate till _arguments.count()
}
}
示例10: arguments
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
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();
}
示例11: write_parameters
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
/**
* Write the operation parameters.
*
* @param header the message header
* @param request_part the stream to write parameters into
*
* @throws MARSHAL if the attempt to write the parameters has failde.
*/
protected void write_parameters(MessageHeader header,
BufferedCdrOutput request_part
) throws MARSHAL
{
// Align after 1.2, but only once.
boolean align = header.version.since_inclusive(1, 2);
NamedValue para;
try
{
// Write parameters now.
for (int i = 0; i < m_args.count(); i++)
{
para = m_args.item(i);
// This bit is set both for ARG_IN and ARG_INOUT
if ((para.flags() & ARG_IN.value) != 0)
{
if (align)
{
request_part.align(8);
align = false;
}
para.value().write_value(request_part);
}
}
}
catch (Bounds ex)
{
InternalError ierr = new InternalError();
ierr.initCause(ex);
throw ierr;
}
}
示例12: invoke
import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
/**
* Make an invocation and store the result in the fields of this Request. Used
* with DII only.
*/
public void invoke()
{
InvokeHandler handler = object.getHandler(operation(), cookie, false);
if (handler instanceof DynamicImpHandler)
{
DynamicImplementation dyn = ((DynamicImpHandler) handler).servant;
if (serverRequest == null)
{
serverRequest = new LocalServerRequest(this);
}
try
{
poa.m_orb.currents.put(Thread.currentThread(), this);
dyn.invoke(serverRequest);
}
finally
{
poa.m_orb.currents.remove(Thread.currentThread());
}
}
else
{
org.omg.CORBA.portable.InputStream input = v_invoke(handler);
if (!exceptionReply)
{
NamedValue arg;
// Read return value, if set.
if (m_result != null)
{
m_result.value().read_value(input, m_result.value().type());
}
// Read returned parameters, if set.
if (m_args != null)
{
for (int i = 0; i < m_args.count(); i++)
{
try
{
arg = m_args.item(i);
// Both ARG_INOUT and ARG_OUT have this binary flag set.
if ((arg.flags() & ARG_OUT.value) != 0)
{
arg.value().read_value(input, arg.value().type());
}
}
catch (Bounds ex)
{
Unexpected.error(ex);
}
}
}
}
else// User exception reply
{
// Prepare an Any that will hold the exception.
gnuAny exc = new gnuAny();
exc.insert_Streamable(new StreamHolder(input));
UnknownUserException unuex = new UnknownUserException(exc);
m_environment.exception(unuex);
}
}
}