Java Code Examples for org.omg.CORBA.Any#type()

The following examples show how to use org.omg.CORBA.Any#type() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DynUnionImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 2
Source File: DynUnionImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 3
Source File: DynUnionImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 4
Source File: DynUnionImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 5
Source File: DynUnionImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 6
Source File: DynUnionImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 7
Source File: DynUnionImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 8
Source File: DynUnionImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 9
Source File: DynUnionImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void set_to_no_active_member ()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (status == STATUS_DESTROYED) {
        throw wrapper.dynAnyDestroyed() ;
    }
    // _REVISIT_ How does one check for "entire range of discriminator values"?
    if (defaultIndex() != -1) {
        throw new TypeMismatch();
    }
    checkInitComponents();
    Any discriminatorAny = getAny(discriminator);
    // erase the discriminators value so that it does not correspond
    // to any of the unions case labels
    discriminatorAny.type(discriminatorAny.type());
    index = 0;
    currentMemberIndex = NO_INDEX;
    // Necessary to guarantee OBJECT_NOT_EXIST in member()
    currentMember.destroy();
    currentMember = null;
    components[0] = discriminator;
    representations = REPRESENTATION_COMPONENTS;
}
 
Example 10
Source File: RequestImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
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()
    }
}
 
Example 11
Source File: RequestImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 12
Source File: RequestImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 13
Source File: RequestImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 14
Source File: RequestImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 15
Source File: RequestImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 16
Source File: CorbaObjectWriter.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void writeAny(CorbaAnyHandler anyHandler) throws CorbaBindingException {
    CorbaObjectHandler containedType = anyHandler.getAnyContainedType();
    Any a = anyHandler.getValue();

    // This is true if we have an empty any
    if (containedType != null) {
        a.type(containedType.getTypeCode());
        OutputStream os = a.create_output_stream();
        CorbaObjectWriter writer = new CorbaObjectWriter(os);
        writer.write(containedType);
        a.read_value(os.create_input_stream(), containedType.getTypeCode());
    }
    stream.write_any(a);
}
 
Example 17
Source File: RequestImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 18
Source File: RequestImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 19
Source File: RequestImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example 20
Source File: RequestImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
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()
    }
}