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

org.drools.task.event.TaskEvent Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
package org.drools.task.event;

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

public abstract class TaskEvent extends EventObject implements Externalizable {
	
    private static final String dummySource = "";
    private long taskId;
    
    public TaskEvent() {
        super( dummySource );
    }
    
    public TaskEvent(long taskId) {
        super( taskId );
        this.taskId = (Long) taskId;
    }
    
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeLong( taskId );
    }  
    
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        taskId = in.readLong();
        source = taskId;
    }
    
    public long getTaskId() {
        return taskId;
    }
        
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy