de.ukn.hci.squidy.manager.model
Class Processable

java.lang.Object
  extended by de.ukn.hci.squidy.manager.model.Processable
All Implemented Interfaces:
ILaunchable, IProcessable<Processable>
Direct Known Subclasses:
Pipe, Piping

public abstract class Processable
extends Object
implements IProcessable<Processable>

AbstractProcessable.

 Date: Mar 14, 2009
 Time: 1:43:46 PM
 

Since:
1.0.0
Version:
$Id: Processable.java 30 2009-09-18 22:23:35Z nitsche $
Author:
Roman R&aumldle
Roman.Raedle@uni-konstanz.de
Human-Computer Interaction Group
University of Konstanz

Field Summary
protected  boolean processing
           
static String PROPERTY_DELETE
           
static String PROPERTY_FAILURE_PUBLISH
           
static String PROPERTY_FAILURE_RESOLVE
           
static String PROPERTY_PROCESSING_START
           
static String PROPERTY_PROCESSING_STOP
           
 
Constructor Summary
Processable()
          Default constructor required for JAXB.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void addSubProcessable(Processable processable)
          Adds a sub processable to this processable.
 void delete()
          Allows to delete the IProcessable implementing class.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
 String getId()
           
 Processable getParent()
           
 Collection<Processable> getSubProcessables()
           
 boolean isProcessing()
          Whether the processing is already processing.
protected  void postStopSubProcessables()
          Will be executed after sub-processables has been stopped.
protected  void preStartSubProcessables()
          Will be executed before sub-processables will be started.
 void publishFailure(Throwable e)
           
 void removeStateChangeListener(PropertyChangeListener listener)
           
 void removeStateChangeListener(String propertyName, PropertyChangeListener listener)
           
 void removeSubProcessable(Processable processable)
          Removes a sub processable of the sub processable collection.
 void resolveFailure()
           
 void setId(String id)
           
 void setParent(Processable parent)
           
 void setSubProcessables(Collection<Processable> subProcessables)
           
 void start()
          Allows to start the IProcessable implementing class.
 void stop()
          Allows to stop the IProcessable implementing class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.ukn.hci.squidy.manager.IProcessable
process, publish, publish
 

Field Detail

processing

protected boolean processing

PROPERTY_DELETE

public static final String PROPERTY_DELETE
See Also:
Constant Field Values

PROPERTY_FAILURE_PUBLISH

public static final String PROPERTY_FAILURE_PUBLISH
See Also:
Constant Field Values

PROPERTY_FAILURE_RESOLVE

public static final String PROPERTY_FAILURE_RESOLVE
See Also:
Constant Field Values

PROPERTY_PROCESSING_START

public static final String PROPERTY_PROCESSING_START
See Also:
Constant Field Values

PROPERTY_PROCESSING_STOP

public static final String PROPERTY_PROCESSING_STOP
See Also:
Constant Field Values
Constructor Detail

Processable

public Processable()
Default constructor required for JAXB.

Method Detail

getId

public final String getId()
Returns:
the id

setId

public final void setId(String id)
Parameters:
id - the id to set

getParent

public Processable getParent()
Returns:
the parent

setParent

public void setParent(Processable parent)
Parameters:
parent - the parent to set

getSubProcessables

public Collection<Processable> getSubProcessables()
Returns:
the subProcessables

setSubProcessables

public void setSubProcessables(Collection<Processable> subProcessables)
Parameters:
subProcessables - the subProcessables to set

addSubProcessable

public void addSubProcessable(Processable processable)
Description copied from interface: IProcessable
Adds a sub processable to this processable.

Specified by:
addSubProcessable in interface IProcessable<Processable>
Parameters:
processable - The sub processable.

removeSubProcessable

public void removeSubProcessable(Processable processable)
Description copied from interface: IProcessable
Removes a sub processable of the sub processable collection.

Specified by:
removeSubProcessable in interface IProcessable<Processable>
Parameters:
processable - The sub processable that should be removed of the sub processable collection.

isProcessing

public boolean isProcessing()
Description copied from interface: IProcessable
Whether the processing is already processing.

Specified by:
isProcessing in interface IProcessable<Processable>
Returns:
True if the processable is processing data.

start

public void start()
           throws ProcessException
Description copied from interface: ILaunchable
Allows to start the IProcessable implementing class.

Specified by:
start in interface ILaunchable
Throws:
ProcessException - Exception can occur while trying to start the IProcessable.

stop

public void stop()
          throws ProcessException
Description copied from interface: ILaunchable
Allows to stop the IProcessable implementing class.

Specified by:
stop in interface ILaunchable
Throws:
ProcessException - Exception can occur while trying to stop the IProcessable.

preStartSubProcessables

protected void preStartSubProcessables()
Will be executed before sub-processables will be started.


postStopSubProcessables

protected void postStopSubProcessables()
Will be executed after sub-processables has been stopped.


delete

public void delete()
            throws ProcessException
Description copied from interface: ILaunchable
Allows to delete the IProcessable implementing class.

Specified by:
delete in interface ILaunchable
Throws:
ProcessException - Exception can occur while trying to stop the IProcessable.

publishFailure

public void publishFailure(Throwable e)
Specified by:
publishFailure in interface ILaunchable

resolveFailure

public void resolveFailure()
Specified by:
resolveFailure in interface ILaunchable

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
Parameters:
listener -
See Also:
PropertyChangeSupport.addPropertyChangeListener(PropertyChangeListener)

addPropertyChangeListener

public final void addPropertyChangeListener(String propertyName,
                                            PropertyChangeListener listener)
Parameters:
propertyName -
listener -
See Also:
PropertyChangeSupport.addPropertyChangeListener(String, PropertyChangeListener)

removeStateChangeListener

public final void removeStateChangeListener(PropertyChangeListener listener)
Parameters:
listener -
See Also:
PropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener)

removeStateChangeListener

public final void removeStateChangeListener(String propertyName,
                                            PropertyChangeListener listener)
Parameters:
propertyName -
listener -
See Also:
PropertyChangeSupport.removePropertyChangeListener(String, PropertyChangeListener)

firePropertyChange

public final void firePropertyChange(String propertyName,
                                     Object oldValue,
                                     Object newValue)
Parameters:
propertyName -
oldValue -
newValue -
See Also:
PropertyChangeSupport.firePropertyChange(String, Object, Object)


Copyright © 2007-2010 Human-Computer-Interaction :: University of Konstanz. All Rights Reserved.