下面列出了怎么用org.omg.CORBA.Bounds的API类实例代码及写法,或者点击链接到github查看源代码。
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
/** 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);
}
}
}
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()
}
}
public TypeCode item(int index)
throws Bounds
{
try {
return (TypeCode) _exceptions.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_exceptions.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public String item(int index)
throws Bounds
{
try {
return (String) _contexts.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_contexts.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public NamedValue item(int index)
throws Bounds
{
try {
return (NamedValue) _namedValues.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_namedValues.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public String item(int index)
throws Bounds
{
try {
return (String) _contexts.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
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()
}
}
public TypeCode item(int index)
throws Bounds
{
try {
return (TypeCode) _exceptions.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_exceptions.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public String item(int index)
throws Bounds
{
try {
return (String) _contexts.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_contexts.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_namedValues.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
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 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()
}
}
public TypeCode item(int index)
throws Bounds
{
try {
return (TypeCode) _exceptions.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_exceptions.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public String item(int index)
throws Bounds
{
try {
return (String) _contexts.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public void remove(int index)
throws Bounds
{
try {
_contexts.removeElementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}
public NamedValue item(int index)
throws Bounds
{
try {
return (NamedValue) _namedValues.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}