Java Code Examples for javax.rmi.CORBA.Util#writeAbstractObject()

The following examples show how to use javax.rmi.CORBA.Util#writeAbstractObject() . 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: IIOPOutputStream.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 2
Source File: IIOPOutputStream.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 3
Source File: IIOPOutputStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 4
Source File: IIOPOutputStream.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 5
Source File: IIOPOutputStream.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 6
Source File: IIOPOutputStream.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 7
Source File: IIOPOutputStream.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Override the actions of the final method "writeObject()"
 * in ObjectOutputStream.
 * @since     JDK1.1.6
 */
public final void writeObjectOverride(Object obj)
    throws IOException
{
    writeObjectState.writeData(this);

    Util.writeAbstractObject((OutputStream)orbStream, obj);
}
 
Example 8
Source File: IIOPOutputStream.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 9
Source File: DynamicMethodMarshallerImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 10
Source File: IIOPOutputStream.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 11
Source File: DynamicMethodMarshallerImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 12
Source File: DynamicMethodMarshallerImpl.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 13
Source File: DynamicMethodMarshallerImpl.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 14
Source File: IIOPOutputStream.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 15
Source File: DynamicMethodMarshallerImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 16
Source File: IIOPOutputStream.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 17
Source File: IIOPOutputStream.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 18
Source File: DynamicMethodMarshallerImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 19
Source File: IIOPOutputStream.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void writeObjectField(ObjectStreamField field,
                              Object objectValue) throws IOException {

    if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
        javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
    }
    else {
        Class type = field.getType();
        int callType = ValueHandlerImpl.kValueType;

        if (type.isInterface()) {
            String className = type.getName();

            if (java.rmi.Remote.class.isAssignableFrom(type)) {

                // RMI Object reference...

                callType = ValueHandlerImpl.kRemoteType;


            } else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){

                // IDL Object reference...
                callType = ValueHandlerImpl.kRemoteType;

            } else if (RepositoryId.isAbstractBase(type)) {
                // IDL Abstract Object reference...
                callType = ValueHandlerImpl.kAbstractType;
            } else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
                callType = ValueHandlerImpl.kAbstractType;
            }
        }

        switch (callType) {
        case ValueHandlerImpl.kRemoteType:
            Util.writeRemoteObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kAbstractType:
            Util.writeAbstractObject(orbStream, objectValue);
            break;
        case ValueHandlerImpl.kValueType:
            try{
                orbStream.write_value((java.io.Serializable)objectValue, type);
            }
            catch(ClassCastException cce){
                if (objectValue instanceof java.io.Serializable)
                    throw cce;
                else
                    Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
            }
        }
    }
}
 
Example 20
Source File: DynamicMethodMarshallerImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}