Package org.omg.CORBA

Examples of org.omg.CORBA.INTF_REPOS


    public org.omg.CORBA.IDLType result_def()
    {
        if ( ! defined)
        {
            throw new INTF_REPOS ("OperationDef undefined");
        }
        if (result_def == null)
        {
            throw new INTF_REPOS ("Result def for op " + name () + " null");
        }
        return result_def;
    }
View Full Code Here


    public org.omg.CORBA.TypeCode result()
    {
        if ( ! defined)
        {
            throw new INTF_REPOS ("OperationDeg undefined");
        }

        return result;
    }
View Full Code Here

        {
      org.omg.CORBA.ContainedPackage.Description cd = exceptions[i].describe();

            if( cd.kind != org.omg.CORBA.DefinitionKind.dk_Exception )
            {
                throw new INTF_REPOS( ErrorMsg.IR_Unexpected_Definition_Kind,
                                                    org.omg.CORBA.CompletionStatus.COMPLETED_NO);
            }
            ex_des[i] = org.omg.CORBA.ExceptionDescriptionHelper.extract( cd.value );
        }
        return new org.omg.CORBA.OperationDescription(name,
View Full Code Here

    // from IRObject

    public void destroy()
    {
        throw new INTF_REPOS(
                                           ErrorMsg.IR_Not_Implemented,
                                           org.omg.CORBA.CompletionStatus.COMPLETED_NO);
    }
View Full Code Here

    public org.omg.CORBA.ContainedPackage.Description describe()
    {
        if ( ! defined)
        {
            throw new INTF_REPOS ("OperationDeg undefined");
        }


        org.omg.CORBA.Any a = orb.create_any();
        org.omg.CORBA.OperationDescriptionHelper.insert( a, describe_operation() );
View Full Code Here

        this.poa = poa;
        this.logger = logger;

        if (ir == null)
        {
            throw new INTF_REPOS ("IR null!");
        }

        if (def_in == null)
        {
            throw new INTF_REPOS ("Defined_in null!");
        }

        def_kind = org.omg.CORBA.DefinitionKind.dk_Interface;
        containing_repository = ir;
        defined_in = def_in;
        if( def_in.equals(ir) )
            myContainer = null;
        else
            myContainer = org.omg.CORBA.ContainedHelper.narrow( defined_in );

        this.path = path;

        theClass = c;
        String classId = c.getName();
        this.helperClass = helperClass;

        Hashtable irInfo= null;
        Class irHelperClass = null;
        try
        {
            irHelperClass =
                this.loader.loadClass( theClass.getName() + "IRHelper");
            irInfo = (Hashtable)irHelperClass.getDeclaredField("irInfo").get(null);
        }
        catch( ClassNotFoundException e )
        {
            logger.error("No IR helper class for interface " +
                         theClass.getName(), e);
        }
        catch( Exception e )
        {
            logger.error("Caught Exception", e);
        }

        if (irInfo == null)
        {
            throw new INTF_REPOS ("IR Info null!");
        }

        try
        {
            containedClass = this.loader.loadClass("org.omg.CORBA.Contained");
            signatureClass = this.loader.loadClass(classId + "Operations");

            id( (String)helperClass.getDeclaredMethod("id", (Class[]) null).invoke( null, (Object[]) null ) );
            version( id().substring( id().lastIndexOf(':')));
            typeCode = TypeCodeUtil.getTypeCode( c, null, this.logger );

            full_name = classId.replace('.', '/');
            if( classId.indexOf('.') > 0 )
            {
                name = classId.substring( classId.lastIndexOf('.')+1);

                if (defined_in == null)
                {
                    throw new INTF_REPOS ("InterfaceDef " + name + " path " + path +
                                          " has no defined_in repository");
                }

                if( containedClass.isAssignableFrom( defined_in.getClass() ))
                    absolute_name =
                        ( myContainer != null ? myContainer.absolute_name() : "Global" )
                        + "::" + name;
                else
                    absolute_name = "::" + name;
            }
            else
            {
                name = classId;
                defined_in = containing_repository;
                absolute_name = "::" + name;
            }

            if (this.logger.isDebugEnabled())
            {
                this.logger.debug("InterfaceDef: " + absolute_name +
                                  " path: " + path);
            }

            /* get directory for nested definitions' classes */
            File f =
                new File( path + fileSeparator +
                          classId.replace('.', fileSeparator) + "Package" );

            if( f.exists() && f.isDirectory() )
                my_dir = f;


        }
        catch ( Exception e )
        {
            this.logger.error("Caught exception",e);
            throw new INTF_REPOS( ErrorMsg.IR_Not_Implemented,
                                                org.omg.CORBA.CompletionStatus.COMPLETED_NO);
        }
    }
View Full Code Here

        }

        // read from the interface class (operations and atributes)
        if (getReference() == null)
        {
            throw new INTF_REPOS ("getReference returns null");
        }

        myReference =
            org.omg.CORBA.InterfaceDefHelper.narrow( getReference());

        if (myReference == null)
        {
            throw new INTF_REPOS ("narrow failed for " + getReference ());
        }

        /* load nested definitions from interfacePackage directory */

        String[] classes = null;
View Full Code Here

        containing_repository = ir;
        defined_in = _defined_in;
        this.path = path;
        if (defined_in == null)
        {
            throw new INTF_REPOS ("defined_in = null");
        }
        if (containing_repository == null)
        {
            throw new INTF_REPOS ("containing_repository = null");
        }

        try
        {
            String classId = c.getName();
            myClass = c;
            version( "1.0" );
            full_name = classId.replace('.', '/');

            if( classId.indexOf('.') > 0 )
            {
                name( classId.substring( classId.lastIndexOf('.')+1 ) );
                absolute_name =
                    org.omg.CORBA.ContainedHelper.narrow( defined_in ).absolute_name() +
                    "::" + name;
            }
            else
            {
                name( classId );
                absolute_name = "::" + name;
            }

            helperClass = this.loader.loadClass( classId + "Helper") ;
            id( (String)helperClass.getDeclaredMethod( "id", (Class[]) null ).invoke( null, (Object[]) null ));

//              type =
//                  TypeCodeUtil.getTypeCode( myClass, this.loader, null, classId );

            type = (org.omg.CORBA.TypeCode)helperClass.getDeclaredMethod(
                                                   "type",
                                                   (Class[]) null ).invoke( null, (Object[]) null );

            members = new org.omg.CORBA.StructMember[ type.member_count() ];
            for( int i = 0; i < members.length; i++ )
            {
                org.omg.CORBA.TypeCode type_code = type.member_type(i);
                String member_name = type.member_name(i);

                if (this.logger.isDebugEnabled())
                {
                    this.logger.debug("StructDef " + absolute_name  +
                                      " member " + member_name);
                }

                members[i] = new org.omg.CORBA.StructMember( member_name,
                                                             type_code,
                                                             null );
            }
            /* get directory for nested definitions' classes */
            File f = new File( path + fileSeparator +
                               classId.replace('.', fileSeparator) + "Package" );

            if( f.exists() && f.isDirectory() )
                my_dir = f;

            if (this.logger.isDebugEnabled())
            {
                this.logger.debug("StructDef: " + absolute_name);
            }
        }
        catch ( Exception e )
        {
            logger.error("Caught Exception", e);
            throw new INTF_REPOS( ErrorMsg.IR_Not_Implemented,
                                  org.omg.CORBA.CompletionStatus.COMPLETED_NO);
        }
    }
View Full Code Here

    public void loadContents()
    {
        // read from the  class (operations and atributes)
        if (getReference () == null)
        {
            throw new INTF_REPOS ("getReference returns null");
        }

        org.omg.CORBA.StructDef myReference =
            org.omg.CORBA.StructDefHelper.narrow( getReference());

        if (myReference == null)
        {
            throw new INTF_REPOS ("narrow failed for " + getReference() );
        }

        /* load nested definitions from interfacePackage directory */

        String[] classes = null;
View Full Code Here

                IDLType.create( members[i].type, containing_repository,
                                this.logger, this.poa);

            if (members[i].type_def == null)
            {
                throw new INTF_REPOS ("No type_def for member " + members[i].name +
                                      " in struct " +  full_name );
            }
        }
        defined = true;
View Full Code Here

TOP

Related Classes of org.omg.CORBA.INTF_REPOS

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.