org.cip4.elk.impl.device.process
Class ConventionalPrintingSimulation

java.lang.Object
  extended by org.cip4.elk.impl.device.process.AbstractProcess
      extended by org.cip4.elk.impl.device.process.ConventionalPrintingSimulation
All Implemented Interfaces:
org.cip4.elk.device.process.Process, DeviceStateContext, org.cip4.elk.lifecycle.Lifecycle

public class ConventionalPrintingSimulation
extends AbstractProcess
implements DeviceStateContext, org.cip4.elk.lifecycle.Lifecycle


Field Summary
 
Fields inherited from class org.cip4.elk.impl.device.process.AbstractProcess
nodeStatusEventNotifier, processStatusEventNotifier, resourceEventNotifier
 
Constructor Summary
ConventionalPrintingSimulation(int deviceSpeed, org.cip4.elk.device.process.JDFNodeSelector nodeSelector, org.cip4.elk.device.DeviceConfig deviceConfig)
          Creates a new simulated ConventionalPrinting Process.
 
Method Summary
 void abortJob()
           
 void destroy()
           
 void fireNodeStatusEvent(org.cip4.elk.device.process.NodeStatusEvent event)
           
 void fireProcessStatusEvent(org.cip4.elk.device.process.ProcessStatusEvent event)
           
 void fireResourceEvent(org.cip4.elk.device.process.ResourceEvent event)
           
 void flushResources()
           
 org.cip4.elk.device.DeviceConfig getDeviceConfig()
           
 int getDeviceSpeed()
          Gets the speed of the device.
 org.cip4.jdflib.jmf.JDFJobPhase getJobPhase()
           
 org.cip4.jdflib.node.JDFNode getNode()
          Returns the JDF node currently being processed by the device.
 org.cip4.elk.device.process.JDFNodeSelector getNodeSelector()
           
 org.cip4.elk.device.process.Process getProcess()
           
 java.lang.String[] getProcessTypes()
           
 org.cip4.jdflib.node.JDFNode getRunningJDFNode()
           
 org.cip4.elk.queue.QueueEntry getRunningQueueEntry()
           
 org.cip4.jdflib.auto.JDFAutoDeviceInfo.EnumDeviceStatus getStatus()
           
 void init()
           
 boolean isStopped()
           
 void resumeJob()
          Resumes a stopped/paused job.
 void runJob(org.cip4.elk.queue.QueueEntry queueEntry)
           
 void setDeviceSpeed(int speed)
          Sets the speed of the device.
 void sleep()
           
 void stopJob()
          Stops/pauses the executing job.
 void suspendJob()
          Suspends the executing job.
 void testRunJob(java.lang.String arg0)
           
 void wakeUp()
           
 
Methods inherited from class org.cip4.elk.impl.device.process.AbstractProcess
addNodeStatusEventListener, addProcessStatusEventListener, addResourceEventListener, fireEvent, fireEvent, fireEvent, removeNodeStatusEventListener, removeProcessStatusEventListener, removeResourceEventListener, setJobStatusEventListeners, setProcessStatusEventListeners, setResourceEventListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.cip4.elk.impl.device.process.state.DeviceStateContext
addNodeStatusEventListener
 

Constructor Detail

ConventionalPrintingSimulation

public ConventionalPrintingSimulation(int deviceSpeed,
                                      org.cip4.elk.device.process.JDFNodeSelector nodeSelector,
                                      org.cip4.elk.device.DeviceConfig deviceConfig)
Creates a new simulated ConventionalPrinting Process.

Parameters:
deviceSpeed - the speed of the press, sheets/hour
nodeSelector - the JDFNodeSelector used for selecting JDF nodes to execute
deviceConfig - the configuration of device this Process's belongs to
Method Detail

runJob

public void runJob(org.cip4.elk.queue.QueueEntry queueEntry)
            throws java.lang.Exception
Specified by:
runJob in interface org.cip4.elk.device.process.Process
Throws:
java.lang.Exception

getProcessTypes

public java.lang.String[] getProcessTypes()
Specified by:
getProcessTypes in interface org.cip4.elk.device.process.Process

abortJob

public void abortJob()
Specified by:
abortJob in interface org.cip4.elk.device.process.Process

destroy

public void destroy()
Specified by:
destroy in interface org.cip4.elk.device.process.Process
Specified by:
destroy in interface org.cip4.elk.lifecycle.Lifecycle

flushResources

public void flushResources()
Specified by:
flushResources in interface org.cip4.elk.device.process.Process

getDeviceConfig

public org.cip4.elk.device.DeviceConfig getDeviceConfig()
Specified by:
getDeviceConfig in interface org.cip4.elk.device.process.Process
Specified by:
getDeviceConfig in interface DeviceStateContext

getJobPhase

public org.cip4.jdflib.jmf.JDFJobPhase getJobPhase()
Specified by:
getJobPhase in interface org.cip4.elk.device.process.Process

getRunningJDFNode

public org.cip4.jdflib.node.JDFNode getRunningJDFNode()
Specified by:
getRunningJDFNode in interface org.cip4.elk.device.process.Process

getRunningQueueEntry

public org.cip4.elk.queue.QueueEntry getRunningQueueEntry()
Specified by:
getRunningQueueEntry in interface org.cip4.elk.device.process.Process

getStatus

public org.cip4.jdflib.auto.JDFAutoDeviceInfo.EnumDeviceStatus getStatus()
Specified by:
getStatus in interface org.cip4.elk.device.process.Process

init

public void init()
Specified by:
init in interface org.cip4.elk.device.process.Process
Specified by:
init in interface org.cip4.elk.lifecycle.Lifecycle

resumeJob

public void resumeJob()
Resumes a stopped/paused job. If no job is currently stopped/paused, then this method does nothing.

Specified by:
resumeJob in interface org.cip4.elk.device.process.Process
See Also:
resumeJob()

sleep

public void sleep()
Specified by:
sleep in interface org.cip4.elk.device.process.Process

suspendJob

public void suspendJob()
Suspends the executing job. The executing JDF node is set to Suspended and then runJob(QueueEntry) will return so the other jobs can be executed instead.

Specified by:
suspendJob in interface org.cip4.elk.device.process.Process

testRunJob

public void testRunJob(java.lang.String arg0)
Specified by:
testRunJob in interface org.cip4.elk.device.process.Process

wakeUp

public void wakeUp()
Specified by:
wakeUp in interface org.cip4.elk.device.process.Process

isStopped

public boolean isStopped()

stopJob

public void stopJob()
Stops/pauses the executing job. While a job is stopped no other jobs can execute. The stopped/paused job can be start/resumed again by calling resumeJob().

Specified by:
stopJob in interface org.cip4.elk.device.process.Process
See Also:
resumeJob()

fireNodeStatusEvent

public void fireNodeStatusEvent(org.cip4.elk.device.process.NodeStatusEvent event)
Specified by:
fireNodeStatusEvent in interface DeviceStateContext

fireProcessStatusEvent

public void fireProcessStatusEvent(org.cip4.elk.device.process.ProcessStatusEvent event)
Specified by:
fireProcessStatusEvent in interface DeviceStateContext

fireResourceEvent

public void fireResourceEvent(org.cip4.elk.device.process.ResourceEvent event)
Specified by:
fireResourceEvent in interface DeviceStateContext

getNode

public org.cip4.jdflib.node.JDFNode getNode()
Description copied from interface: DeviceStateContext
Returns the JDF node currently being processed by the device.

Specified by:
getNode in interface DeviceStateContext
Returns:

getNodeSelector

public org.cip4.elk.device.process.JDFNodeSelector getNodeSelector()
Specified by:
getNodeSelector in interface DeviceStateContext

setDeviceSpeed

public void setDeviceSpeed(int speed)
Description copied from interface: DeviceStateContext
Sets the speed of the device.

Specified by:
setDeviceSpeed in interface DeviceStateContext

getDeviceSpeed

public int getDeviceSpeed()
Description copied from interface: DeviceStateContext
Gets the speed of the device.

Specified by:
getDeviceSpeed in interface DeviceStateContext
Returns:
the units per hour the device produces

getProcess

public org.cip4.elk.device.process.Process getProcess()
Specified by:
getProcess in interface DeviceStateContext


Copyright © 2004-2009 CIP4. All Rights Reserved.