本文整理汇总了Java中org.omg.CORBA.Bounds类的典型用法代码示例。如果您正苦于以下问题:Java Bounds类的具体用法?Java Bounds怎么用?Java Bounds使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Bounds类属于org.omg.CORBA包,在下文中一共展示了Bounds类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: marshalReplyParams
import org.omg.CORBA.Bounds; //导入依赖的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: exceptions
import org.omg.CORBA.Bounds; //导入依赖的package包/类
/** @inheritDoc */
public TypeCode[] exceptions()
{
request.checkDii();
ExceptionList ex = request.exceptions();
TypeCode[] et = new TypeCode[ ex.count() ];
try
{
for (int i = 0; i < et.length; i++)
{
et [ i ] = ex.item(i);
}
}
catch (Bounds e)
{
throw new Unexpected(e);
}
return et;
}
示例3: set_args
import org.omg.CORBA.Bounds; //导入依赖的package包/类
/**
* 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);
}
}
}
示例4: ice_contexts
import org.omg.CORBA.Bounds; //导入依赖的package包/类
/**
* Get contexts as required by interceptor.
*/
public String[] ice_contexts()
{
if (m_context_list == null)
return new String[ 0 ];
else
{
try
{
String[] cn = new String[ m_context_list.count() ];
for (int i = 0; i < cn.length; i++)
cn [ i ] = m_context_list.item(i);
return cn;
}
catch (Bounds e)
{
throw new Unexpected(e);
}
}
}
示例5: set_values
import org.omg.CORBA.Bounds; //导入依赖的package包/类
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) {}
}
示例6: delete_values
import org.omg.CORBA.Bounds; //导入依赖的package包/类
public void delete_values(String prop_name)
{
if (prop_name == null)
throw new BAD_PARAM("Null string reference", 0,
CompletionStatus.COMPLETED_NO);
if (m_values != null) {
int list_size = m_values.count();
try {
for (int i = 0; i < list_size; i++) {
if (prop_name.equals(m_values.item(i).name())) {
m_values.remove(i);
}
}
}
catch (Bounds bds) {}
}
}
示例7: assignOutArguments
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例8: assignInArguments
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例9: readOutParams
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例10: writeOutParams
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例11: readInParams
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例12: writeInParams
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例13: setOutParamsAsIn
import org.omg.CORBA.Bounds; //导入依赖的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");
}
}
示例14: unmarshalReply
import org.omg.CORBA.Bounds; //导入依赖的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()
}
}
示例15: item
import org.omg.CORBA.Bounds; //导入依赖的package包/类
public TypeCode item(int index)
throws Bounds
{
try {
return (TypeCode) _exceptions.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
throw new Bounds();
}
}