jp.digitalmuseum.mr.task
クラス TaskAbstractImpl

java.lang.Object
  上位を拡張 jp.digitalmuseum.mr.service.ServiceAbstractImpl
      上位を拡張 jp.digitalmuseum.mr.task.TaskAbstractImpl
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Runnable, EventProvider, Service, Task
直系の既知のサブクラス:
Capture, EndCleaning, EndPen, MobileTaskAbstractImpl, PutPen, StartCleaning

public abstract class TaskAbstractImpl
extends ServiceAbstractImpl
implements Task
Abstract implementation of Task interface.
All Task implementation classes must extend this abstract class.
作成者:
Jun KATO
関連項目:
直列化された形式

フィールドの概要
 
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたフィールド
DEFAULT_INTERVAL
 
コンストラクタの概要
TaskAbstractImpl()
           
 
メソッドの概要
 boolean assign(Robot robot)
          Assign this task to a robot.
protected  void finish()
           
 Robot getAssignedRobot()
           
 java.lang.String getName()
           
 java.util.List<java.lang.Class<? extends Resource>> getRequirements()
           
protected  ResourceMap getResourceMap()
           
 Workflow getSubflow()
           
 boolean hasSubflow()
           
protected  void initialize()
           
 boolean isAssignable(Robot robot)
           
 boolean isAssigned()
           
protected  void onAssigned()
          Called when this task is assigned to a robot.
static boolean requirementsSuppliable(java.util.List<java.lang.Class<? extends Resource>> list, java.util.List<java.lang.Class<? extends Resource>> list2)
           
protected  void setSubflow(Workflow subflow)
           
 void start()
          Start this service.
 void stop()
          Free resources and stop this task.
 
クラス jp.digitalmuseum.mr.service.ServiceAbstractImpl から継承されたメソッド
addEventListener, dispose, distributeEvent, getAliveTime, getConfigurationComponent, getInterval, getServiceGroup, isDisposed, isPaused, isStarted, onPause, onResume, onStart, onStop, pause, removeEventListener, resume, setInterval, setServiceGroup, start, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース jp.digitalmuseum.mr.service.Service から継承されたメソッド
dispose, getAliveTime, getConfigurationComponent, getInterval, getServiceGroup, isDisposed, isPaused, isStarted, pause, resume, setInterval, setServiceGroup, start
 
インタフェース java.lang.Runnable から継承されたメソッド
run
 
インタフェース jp.digitalmuseum.mr.message.EventProvider から継承されたメソッド
addEventListener, removeEventListener
 
コンストラクタの詳細

TaskAbstractImpl

public TaskAbstractImpl()
メソッドの詳細

getName

public java.lang.String getName()
定義:
インタフェース Service 内の getName
オーバーライド:
クラス ServiceAbstractImpl 内の getName
戻り値:
Returns the name of this service.

initialize

protected void initialize()
オーバーライド:
クラス ServiceAbstractImpl 内の initialize

getRequirements

public java.util.List<java.lang.Class<? extends Resource>> getRequirements()
定義:
インタフェース Task 内の getRequirements
戻り値:
Returns a set of required interfaces for this task.

assign

public boolean assign(Robot robot)
インタフェース Task の記述:
Assign this task to a robot.
定義:
インタフェース Task 内の assign
戻り値:
Returns false if required resources of the robot are busy.

isAssignable

public boolean isAssignable(Robot robot)
定義:
インタフェース Task 内の isAssignable
戻り値:
Returns if this task can be assigned to the robot.

isAssigned

public boolean isAssigned()
定義:
インタフェース Task 内の isAssigned
戻り値:
Returns if this task is assigned to a robot.

getAssignedRobot

public Robot getAssignedRobot()
定義:
インタフェース Task 内の getAssignedRobot
戻り値:
Returns the assigned robot.

start

public final void start()
インタフェース Service の記述:
Start this service. *
定義:
インタフェース Service 内の start
オーバーライド:
クラス ServiceAbstractImpl 内の start
関連項目:
Service.start(ServiceGroup), Service.pause(), Service.resume(), Service.stop()

stop

public final void stop()
Free resources and stop this task.
定義:
インタフェース Service 内の stop
オーバーライド:
クラス ServiceAbstractImpl 内の stop
関連項目:
Service.start()

setSubflow

protected void setSubflow(Workflow subflow)

getSubflow

public Workflow getSubflow()
定義:
インタフェース Task 内の getSubflow
戻り値:
Returns a workflow graph running inside this task.

hasSubflow

public boolean hasSubflow()
定義:
インタフェース Task 内の hasSubflow
戻り値:
Returns if this task is running a workflow graph inside.

getResourceMap

protected ResourceMap getResourceMap()
戻り値:
Returns the current resource map.

onAssigned

protected void onAssigned()
Called when this task is assigned to a robot. This method is usually used for getting a resource object and saving it to a instance field.

finish

protected void finish()

requirementsSuppliable

public static boolean requirementsSuppliable(java.util.List<java.lang.Class<? extends Resource>> list,
                                             java.util.List<java.lang.Class<? extends Resource>> list2)
パラメータ:
list -
list2 -
戻り値:
Returns if the requirements can be satisfied with the supply by means of class types.


Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/