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

Ice.LogMessageType 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) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.3
//
// 
//
// Generated from file `RemoteLogger.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * An enumeration representing the different types of log messages.
 *
 **/
public enum LogMessageType implements java.io.Serializable
{
    /**
     * The {@link Logger} received a print message.
     *
     **/
    PrintMessage(0),

    /**
     * The {@link Logger} received a trace message.
     *
     **/
    TraceMessage(1),

    /**
     * The {@link Logger} received a warning message.
     *
     **/
    WarningMessage(2),

    /**
     * The {@link Logger} received an error message.
     *
     **/
    ErrorMessage(3);

    public int value()
    {
        return _value;
    }

    public static LogMessageType valueOf(int v)
    {
        switch(v)
        {
        case 0:
            return PrintMessage;
        case 1:
            return TraceMessage;
        case 2:
            return WarningMessage;
        case 3:
            return ErrorMessage;
        }
        return null;
    }

    private LogMessageType(int v)
    {
        _value = v;
    }

    public void ice_write(OutputStream ostr)
    {
        ostr.writeEnum(_value, 3);
    }

    public static void ice_write(OutputStream ostr, LogMessageType v)
    {
        if(v == null)
        {
            ostr.writeEnum(Ice.LogMessageType.PrintMessage.value(), 3);
        }
        else
        {
            ostr.writeEnum(v.value(), 3);
        }
    }

    public static LogMessageType ice_read(InputStream istr)
    {
        int v = istr.readEnum(3);
        return validate(v);
    }

    private static LogMessageType validate(int v)
    {
        final LogMessageType e = valueOf(v);
        if(e == null)
        {
            throw new MarshalException("enumerator value " + v + " is out of range");
        }
        return e;
    }

    private final int _value;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy