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

The following examples show how to use javax.rmi.CORBA.Util#writeAbstractObject() . These examples are extracted from open source projects. 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
/**
 * 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
/**
 * 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
/**
 * 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
/**
 * 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
/**
 * 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
/**
 * 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
/**
 * 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
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 9
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 10
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
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 12
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 13
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 14
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 15
Source Project: JDKSourceCode1.8   File: IIOPOutputStream.java    License: 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 16
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}
 
Example 17
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
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 19
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
public void write( OutputStream os, Object value )
{
    Util.writeAbstractObject( os, value ) ;
}