Package com.sun.corba.se.impl.logging

Examples of com.sun.corba.se.impl.logging.ORBUtilSystemException


        case USER_EXCEPTION :
        case SYSTEM_EXCEPTION :
        case LOCATION_FORWARD :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here


        return AnyImpl.extractAnyFromStream(memberType, input, orb);
    }

    // Creates a default Any of the given type.
    static Any createDefaultAnyOfType(TypeCode typeCode, ORB orb) {
        ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
            CORBALogDomains.RPC_PRESENTATION ) ;

        Any returnValue = orb.create_any();
        // The spec for DynAny differs from Any on initialization via type code:
        // - false for boolean
        // - zero for numeric types
        // - zero for types octet, char, and wchar
        // - the empty string for string and wstring
        // - nil for object references
        // - a type code with a TCKind value of tk_null for type codes
        // - for Any values, an Any containing a type code with a TCKind value of tk_null
        //   type and no value
        switch (typeCode.kind().value()) {
            case TCKind._tk_boolean:
                // false for boolean
                returnValue.insert_boolean(false);
                break;
            case TCKind._tk_short:
                // zero for numeric types
                returnValue.insert_short((short)0);
                break;
            case TCKind._tk_ushort:
                // zero for numeric types
                returnValue.insert_ushort((short)0);
                break;
            case TCKind._tk_long:
                // zero for numeric types
                returnValue.insert_long(0);
                break;
            case TCKind._tk_ulong:
                // zero for numeric types
                returnValue.insert_ulong(0);
                break;
            case TCKind._tk_longlong:
                // zero for numeric types
                returnValue.insert_longlong((long)0);
                break;
            case TCKind._tk_ulonglong:
                // zero for numeric types
                returnValue.insert_ulonglong((long)0);
                break;
            case TCKind._tk_float:
                // zero for numeric types
                returnValue.insert_float((float)0.0);
                break;
            case TCKind._tk_double:
                // zero for numeric types
                returnValue.insert_double((double)0.0);
                break;
            case TCKind._tk_octet:
                // zero for types octet, char, and wchar
                returnValue.insert_octet((byte)0);
                break;
            case TCKind._tk_char:
                // zero for types octet, char, and wchar
                returnValue.insert_char((char)0);
                break;
            case TCKind._tk_wchar:
                // zero for types octet, char, and wchar
                returnValue.insert_wchar((char)0);
                break;
            case TCKind._tk_string:
                // the empty string for string and wstring
                // Make sure that type code for bounded strings gets respected
                returnValue.type(typeCode);
                // Doesn't erase the type of bounded string
                returnValue.insert_string("");
                break;
            case TCKind._tk_wstring:
                // the empty string for string and wstring
                // Make sure that type code for bounded strings gets respected
                returnValue.type(typeCode);
                // Doesn't erase the type of bounded string
                returnValue.insert_wstring("");
                break;
            case TCKind._tk_objref:
                // nil for object references
                returnValue.insert_Object(null);
                break;
            case TCKind._tk_TypeCode:
                // a type code with a TCKind value of tk_null for type codes
                // We can reuse the type code that's already in the any.
                returnValue.insert_TypeCode(returnValue.type());
                break;
            case TCKind._tk_any:
                // for Any values, an Any containing a type code with a TCKind value
                // of tk_null type and no value.
                // This is exactly what the default AnyImpl constructor provides.
                // _REVISIT_ Note that this inner Any is considered uninitialized.
                returnValue.insert_any(orb.create_any());
                break;
            case TCKind._tk_struct:
            case TCKind._tk_union:
            case TCKind._tk_enum:
            case TCKind._tk_sequence:
            case TCKind._tk_array:
            case TCKind._tk_except:
            case TCKind._tk_value:
            case TCKind._tk_value_box:
                // There are no default value for complex types since there is no
                // concept of a hierarchy of Anys. Only DynAnys can be arrange in
                // a hierarchy to mirror the TypeCode hierarchy.
                // See DynAnyConstructedImpl.initializeComponentsFromTypeCode()
                // on how this DynAny hierarchy is created from TypeCodes.
                returnValue.type(typeCode);
                break;
            case TCKind._tk_fixed:
                returnValue.insert_fixed(new BigDecimal("0.0"), typeCode);
                break;
            case TCKind._tk_native:
            case TCKind._tk_alias:
            case TCKind._tk_void:
            case TCKind._tk_Principal:
            case TCKind._tk_abstract_interface:
                returnValue.type(typeCode);
                break;
            case TCKind._tk_null:
                // Any is already initialized to null
                break;
            case TCKind._tk_longdouble:
                // Unspecified for Java
                throw wrapper.tkLongDoubleNotSupported() ;
            default:
                throw wrapper.typecodeNotSupported() ;
        }
        return returnValue;
    }
View Full Code Here

                          new IDLJavaSerializationInputStream(encodingVersion);
                    }
                    return new CDRInputStream_1_2();
                    // else fall through and report exception.
                default:
                    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                        CORBALogDomains.RPC_ENCODING ) ;
                    throw wrapper.unsupportedGiopVersion( version ) ;
            }
        }
View Full Code Here

  if (handler == null) {
      if (defaultHandler != null)
    handler = defaultHandler ;
      else {
    ORBUtilSystemException wrapper = ORBUtilSystemException.get(
        CORBALogDomains.UTIL ) ;
    throw wrapper.noInvocationHandler( "\"" + method.toString() +
        "\"" ) ;
      }
  }

  // handler should never be null here.
View Full Code Here

      try {
    Class result = ORBClassLoader.loadClass( className ) ;
    return result ;
      } catch (Exception exc) {
    ORBUtilSystemException wrapper = ORBUtilSystemException.get(
        CORBALogDomains.ORB_LIFECYCLE ) ;
    throw wrapper.couldNotLoadClass( exc, className ) ;
      }
  }
View Full Code Here

  {
      String val = (String)value ;
      try {
    return new URL( val ) ;
      } catch (MalformedURLException exc) {
    ORBUtilSystemException wrapper = ORBUtilSystemException.get(
        CORBALogDomains.ORB_LIFECYCLE ) ;
    throw wrapper.badUrl( exc, val ) ;
      }
  }
View Full Code Here

            break;

        case TCKind._tk_longdouble:
            // Unspecified for Java
        default:
            ORBUtilSystemException wrapper = ORBUtilSystemException.get(
                (com.sun.corba.se.spi.orb.ORB)s.orb(),
                CORBALogDomains.RPC_PRESENTATION ) ;
            throw wrapper.typecodeNotSupported() ;
        }
    }
View Full Code Here

            break;

        case TCKind._tk_longdouble:
            // Unspecified for Java
        default:
            ORBUtilSystemException wrapper = ORBUtilSystemException.get(
                (com.sun.corba.se.spi.orb.ORB)s.orb(),
                CORBALogDomains.RPC_PRESENTATION ) ;
            throw wrapper.typecodeNotSupported() ;
        }

        oa[0] = o;
        la[0] = l;
    }
View Full Code Here

    public static BufferManagerRead newBufferManagerRead(
            int strategy, byte encodingVersion, ORB orb) {

        if (encodingVersion != Message.CDR_ENC_VERSION) {
            if (strategy != BufferManagerFactory.GROW) {
                ORBUtilSystemException wrapper =
                    ORBUtilSystemException.get((ORB)orb,
                                               CORBALogDomains.RPC_ENCODING);
                throw wrapper.invalidBuffMgrStrategy("newBufferManagerRead");
            }
            return new BufferManagerReadGrow(orb);
        }
        switch (strategy) {
            case BufferManagerFactory.GROW:
View Full Code Here

    public static BufferManagerWrite newBufferManagerWrite(
            int strategy, byte encodingVersion, ORB orb) {
        if (encodingVersion != Message.CDR_ENC_VERSION) {
            if (strategy != BufferManagerFactory.GROW) {
                ORBUtilSystemException wrapper =
                    ORBUtilSystemException.get((ORB)orb,
                                               CORBALogDomains.RPC_ENCODING);
                throw wrapper.invalidBuffMgrStrategy("newBufferManagerWrite");
            }
            return new BufferManagerWriteGrow(orb);
        }
        switch (strategy) {
            case BufferManagerFactory.GROW:
View Full Code Here

TOP

Related Classes of com.sun.corba.se.impl.logging.ORBUtilSystemException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.