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

org.drools.task.service.TaskError Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
/**
 * 
 */
package org.drools.task.service;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public class TaskError
    implements
    Externalizable {
    String msg;

    public TaskError() {
        
    }
    
    public TaskError(String msg) {
        this.msg = msg;
    }

    public void writeExternal(ObjectOutput out) throws IOException {
        if ( msg != null ) {
            out.writeBoolean( true );
            out.writeUTF( msg );
        } else {
            out.writeBoolean( false );
        }
    }

    public void readExternal(ObjectInput in) throws IOException,
                                            ClassNotFoundException {
        if ( in.readBoolean() ) {
            msg = in.readUTF();
        }

    }

    public String getMessage() {
        return msg;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy