jp.digitalmuseum.mr.service
クラス ServiceAbstractImpl

java.lang.Object
  上位を拡張 jp.digitalmuseum.mr.service.ServiceAbstractImpl
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Runnable, EventProvider, Service
直系の既知のサブクラス:
Hakoniwa, HomographyCoordProviderAbstractImpl, LocationProviderAbstractImpl, ScreenLocationProviderAbstractImpl, ServiceGroup, TaskAbstractImpl, TestService

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

フィールドの概要
static int DEFAULT_INTERVAL
           
 
コンストラクタの概要
ServiceAbstractImpl()
           
 
メソッドの概要
 void addEventListener(EventListener listener)
          Add an event listener.
 void dispose()
           
protected  void distributeEvent(Event e)
          Distribute an event to listeners.
 long getAliveTime()
           
 javax.swing.JComponent getConfigurationComponent()
           
 long getInterval()
          Get duration of one cycle in milliseconds.
 java.lang.String getName()
           
 ServiceGroup getServiceGroup()
           
protected  void initialize()
           
 boolean isDisposed()
           
 boolean isPaused()
           
 boolean isStarted()
           
protected  void onPause()
          Called when this service pauses.
protected  void onResume()
          Called when this service resumes from pausing.
protected  void onStart()
          Called when this service starts.

This method is assured to be called before the first call of Runnable.run().
protected  void onStop()
          Called when this service stops.

This method is assured to be called after the last call of Runnable.run().
 void pause()
          Pause this service.
 boolean removeEventListener(EventListener listener)
          Remove an event listener.
 void resume()
          Resume this service.
 void setInterval(long interval)
          Set duration of one cycle in milliseconds.
 void setServiceGroup(ServiceGroup serviceGroup)
          Set the service group to which this service belongs.
 void start()
          Start this service.
 void start(ServiceGroup serviceGroup)
          Start this service on the specified service group.
 void stop()
          Stop this service.
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース java.lang.Runnable から継承されたメソッド
run
 
フィールドの詳細

DEFAULT_INTERVAL

public static final int DEFAULT_INTERVAL
関連項目:
定数フィールド値
コンストラクタの詳細

ServiceAbstractImpl

public ServiceAbstractImpl()
メソッドの詳細

initialize

protected void initialize()

dispose

public void dispose()
定義:
インタフェース Service 内の dispose

setInterval

public final void setInterval(long interval)
インタフェース Service の記述:
Set duration of one cycle in milliseconds.
定義:
インタフェース Service 内の setInterval
パラメータ:
interval - Duration of a period in milliseconds.

getInterval

public long getInterval()
インタフェース Service の記述:
Get duration of one cycle in milliseconds.
定義:
インタフェース Service 内の getInterval
戻り値:
Returns the duration

setServiceGroup

public void setServiceGroup(ServiceGroup serviceGroup)
インタフェース Service の記述:
Set the service group to which this service belongs.
定義:
インタフェース Service 内の setServiceGroup

getServiceGroup

public ServiceGroup getServiceGroup()
定義:
インタフェース Service 内の getServiceGroup
戻り値:
Returns the service group to which this service belongs.

start

public void start(ServiceGroup serviceGroup)
インタフェース Service の記述:
Start this service on the specified service group. Calling this method is equivalent to calling start() after setServiceGroup(serviceGroup).
定義:
インタフェース Service 内の start
関連項目:
Service.start()

start

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

stop

public void stop()
インタフェース Service の記述:
Stop this service. When stopped, run() won't be called any more. To restart this service, call start().
定義:
インタフェース Service 内の stop
関連項目:
Service.start()

pause

public void pause()
インタフェース Service の記述:
Pause this service. When paused, run() won't be called till resume() is called.
定義:
インタフェース Service 内の pause
関連項目:
Service.resume()

resume

public void resume()
インタフェース Service の記述:
Resume this service. Only affective when this service is paused.
定義:
インタフェース Service 内の resume
関連項目:
Service.pause()

isStarted

public boolean isStarted()
定義:
インタフェース Service 内の isStarted
戻り値:
Returns whether this service is started or not.

isPaused

public boolean isPaused()
定義:
インタフェース Service 内の isPaused
戻り値:
Returns whether this service is paused or not.

isDisposed

public boolean isDisposed()
定義:
インタフェース Service 内の isDisposed
戻り値:
Returns whether this service is disposed or not.

getAliveTime

public long getAliveTime()
定義:
インタフェース Service 内の getAliveTime
戻り値:
Returns time elapsed since the service started.

getConfigurationComponent

public javax.swing.JComponent getConfigurationComponent()
定義:
インタフェース Service 内の getConfigurationComponent
戻り値:
Returns a Swing component for configuring this service.
関連項目:
JComponent

getName

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

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

addEventListener

public void addEventListener(EventListener listener)
Add an event listener.
定義:
インタフェース EventProvider 内の addEventListener
関連項目:
EventProvider.removeEventListener(EventListener)

removeEventListener

public boolean removeEventListener(EventListener listener)
Remove an event listener.
定義:
インタフェース EventProvider 内の removeEventListener
戻り値:
Returns whether removal succeeded or not.
関連項目:
EventProvider.addEventListener(EventListener)

onStart

protected void onStart()
Called when this service starts.

This method is assured to be called before the first call of Runnable.run().

onStop

protected void onStop()
Called when this service stops.

This method is assured to be called after the last call of Runnable.run().

onPause

protected void onPause()
Called when this service pauses.

onResume

protected void onResume()
Called when this service resumes from pausing.

distributeEvent

protected void distributeEvent(Event e)
Distribute an event to listeners.
パラメータ:
e -


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