All Downloads are FREE. Search and download functionalities are using the official Maven repository.

IceGrid.ObjectDescriptor Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.3
//
// 
//
// Generated from file `Descriptor.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * An Ice object descriptor.
 *
 **/
public class ObjectDescriptor implements java.lang.Cloneable,
                                         java.io.Serializable
{
    /**
     * The identity of the object.
     *
     **/
    public Ice.Identity id;

    /**
     * The object type.
     *
     **/
    public String type;

    /**
     * Proxy options to use with the proxy created for this Ice object. If empty,
     * the proxy will be created with the proxy options specified on the object
     * adapter or replica group.
     *
     **/
    public String proxyOptions;

    public ObjectDescriptor()
    {
        this.id = new Ice.Identity();
        this.type = "";
        this.proxyOptions = "";
    }

    public ObjectDescriptor(Ice.Identity id, String type, String proxyOptions)
    {
        this.id = id;
        this.type = type;
        this.proxyOptions = proxyOptions;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        ObjectDescriptor r = null;
        if(rhs instanceof ObjectDescriptor)
        {
            r = (ObjectDescriptor)rhs;
        }

        if(r != null)
        {
            if(this.id != r.id)
            {
                if(this.id == null || r.id == null || !this.id.equals(r.id))
                {
                    return false;
                }
            }
            if(this.type != r.type)
            {
                if(this.type == null || r.type == null || !this.type.equals(r.type))
                {
                    return false;
                }
            }
            if(this.proxyOptions != r.proxyOptions)
            {
                if(this.proxyOptions == null || r.proxyOptions == null || !this.proxyOptions.equals(r.proxyOptions))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::ObjectDescriptor");
        h_ = IceInternal.HashUtil.hashAdd(h_, id);
        h_ = IceInternal.HashUtil.hashAdd(h_, type);
        h_ = IceInternal.HashUtil.hashAdd(h_, proxyOptions);
        return h_;
    }

    public ObjectDescriptor
    clone()
    {
        ObjectDescriptor c = null;
        try
        {
            c = (ObjectDescriptor)super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return c;
    }

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        Ice.Identity.ice_write(ostr, this.id);
        ostr.writeString(this.type);
        ostr.writeString(this.proxyOptions);
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.id = Ice.Identity.ice_read(istr);
        this.type = istr.readString();
        this.proxyOptions = istr.readString();
    }

    static public void
    ice_write(Ice.OutputStream ostr, ObjectDescriptor v)
    {
        if(v == null)
        {
            _nullMarshalValue.ice_writeMembers(ostr);
        }
        else
        {
            v.ice_writeMembers(ostr);
        }
    }

    static public ObjectDescriptor
    ice_read(Ice.InputStream istr)
    {
        ObjectDescriptor v = new ObjectDescriptor();
        v.ice_readMembers(istr);
        return v;
    }

    private static final ObjectDescriptor _nullMarshalValue = new ObjectDescriptor();

    public static final long serialVersionUID = 4411521258336168404L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy