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

Ice.LogMessage 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 `RemoteLogger.ice'
//
// Warning: do not edit this file.
//
// 
//

package Ice;

/**
 * A complete log message.
 *
 **/
public class LogMessage implements java.lang.Cloneable, java.io.Serializable
{
    /**
     * The type of message sent to the {@link Logger}.
     *
     **/
    public LogMessageType type;

    /**
     * The date and time when the {@link Logger} received this message, expressed
     * as the number of microseconds since the Unix Epoch (00:00:00 UTC on 1 January 1970)
     *
     **/
    public long timestamp;

    /**
     * For a message of type trace, the trace category of this log message;
     * otherwise, the empty string.
     *
     **/
    public String traceCategory;

    /**
     * The log message itself.
     *
     **/
    public String message;

    public LogMessage()
    {
        type = LogMessageType.PrintMessage;
        traceCategory = "";
        message = "";
    }

    public LogMessage(LogMessageType type, long timestamp, String traceCategory, String message)
    {
        this.type = type;
        this.timestamp = timestamp;
        this.traceCategory = traceCategory;
        this.message = message;
    }

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

        if(_r != null)
        {
            if(type != _r.type)
            {
                if(type == null || _r.type == null || !type.equals(_r.type))
                {
                    return false;
                }
            }
            if(timestamp != _r.timestamp)
            {
                return false;
            }
            if(traceCategory != _r.traceCategory)
            {
                if(traceCategory == null || _r.traceCategory == null || !traceCategory.equals(_r.traceCategory))
                {
                    return false;
                }
            }
            if(message != _r.message)
            {
                if(message == null || _r.message == null || !message.equals(_r.message))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::Ice::LogMessage");
        __h = IceInternal.HashUtil.hashAdd(__h, type);
        __h = IceInternal.HashUtil.hashAdd(__h, timestamp);
        __h = IceInternal.HashUtil.hashAdd(__h, traceCategory);
        __h = IceInternal.HashUtil.hashAdd(__h, message);
        return __h;
    }

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

    public void
    __write(IceInternal.BasicStream __os)
    {
        LogMessageType.__write(__os, type);
        __os.writeLong(timestamp);
        __os.writeString(traceCategory);
        __os.writeString(message);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        type = LogMessageType.__read(__is);
        timestamp = __is.readLong();
        traceCategory = __is.readString();
        message = __is.readString();
    }

    static public void
    __write(IceInternal.BasicStream __os, LogMessage __v)
    {
        if(__v == null)
        {
            __nullMarshalValue.__write(__os);
        }
        else
        {
            __v.__write(__os);
        }
    }

    static public LogMessage
    __read(IceInternal.BasicStream __is, LogMessage __v)
    {
        if(__v == null)
        {
             __v = new LogMessage();
        }
        __v.__read(__is);
        return __v;
    }
    
    private static final LogMessage __nullMarshalValue = new LogMessage();

    public static final long serialVersionUID = 7102329990578383367L;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy