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

Ice.EndpointSelectionType Maven / Gradle / Ivy

Go to download

Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms

There is a newer version: 3.7.10
Show newest version
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.6.4
//
// 
//
// Generated from file `EndpointTypes.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * Determines the order in which the Ice run time uses the endpoints
 * in a proxy when establishing a connection.
 *
 **/
public enum EndpointSelectionType implements java.io.Serializable
{
    
    /**
     * Random causes the endpoints to be arranged in a random order.
     **/
    Random(0),
    
    /**
     * Ordered forces the Ice run time to use the endpoints in the
     * order they appeared in the proxy.
     **/
    Ordered(1);

    public int
    value()
    {
        return __value;
    }

    public static EndpointSelectionType
    valueOf(int __v)
    {
        switch(__v)
        {
        case 0:
            return Random;
        case 1:
            return Ordered;
        }
        return null;
    }

    private
    EndpointSelectionType(int __v)
    {
        __value = __v;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeEnum(value(), 1);
    }

    public static void
    __write(IceInternal.BasicStream __os, EndpointSelectionType __v)
    {
        if(__v == null)
        {
            __os.writeEnum(Ice.EndpointSelectionType.Random.value(), 1);
        }
        else
        {
            __os.writeEnum(__v.value(), 1);
        }
    }

    public static EndpointSelectionType
    __read(IceInternal.BasicStream __is)
    {
        int __v = __is.readEnum(1);
        return __validate(__v);
    }

    private static EndpointSelectionType
    __validate(int __v)
    {
        final EndpointSelectionType __e = valueOf(__v);
        if(__e == null)
        {
            throw new Ice.MarshalException("enumerator value " + __v + " is out of range");
        }
        return __e;
    }

    private final int __value;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy