ru.orbita.nplayer.schedule
Class Task

java.lang.Object
  extended by ru.orbita.nplayer.schedule.Task
All Implemented Interfaces:
java.io.Serializable

public class Task
extends java.lang.Object
implements java.io.Serializable

Date: 22.02.2006 Time: 14:04:53 Класс задания планировщика, включающего в секбя расписание его выполнения. Планировщик в цикле вызывает метод TryExecute() каждого задания, что приводит к его выполнению если это соответствует расписанию.

Version:
1.0
Author:
Alexander Levantovsky
See Also:
Serialized Form

Field Summary
static int DESCRIPTION_LEN_MAX
           
static int E_EVERY_DAY
           
static int E_EVERY_HOUR
           
static int E_EVERY_WEEK
           
static int E_ONCE
          Типы расписаний
static int T_FADE_OUT_ALL
           
static int T_PLAYER_FADE_OUT
           
static int T_PLAYER_NEXT
           
static int T_PLAYER_PAUSE
           
static int T_PLAYER_PLAY
           
static int T_PLAYER_PREV
          Типы заданий
static int T_PLAYER_STOP
           
static int T_STOP_ALL
           
 
Constructor Summary
Task()
           
Task(MultipleProperties prop)
           
 
Method Summary
 java.lang.String getDescription()
           
 int getExecutionDayOfMonth()
           
 boolean[] getExecutionDayOfWeek()
           
 int getExecutionHourOfDay()
           
 int getExecutionMinute()
           
 int getExecutionMonth()
           
 int getExecutionSecond()
           
 int getExecutionYear()
           
 java.lang.String getLastExecutionString()
           
 MultipleProperties getProperties()
           
 java.lang.String getTaskDescription()
           
 int getTaskPlayerNumber()
           
 int getTaskType()
           
 java.lang.String getTimeTableString()
           
 int getTimeTableType()
           
 boolean isEnabled()
           
 void setDescription(java.lang.String description)
           
 void setEnabled(boolean enabled)
           
 void setExecutionDayOfMonth(int executionDayOfMonth)
           
 void setExecutionDayOfWeek(boolean[] executionDayOfWeek)
           
 void setExecutionHourOfDay(int executionHourOfDay)
           
 void setExecutionMinute(int executionMinute)
           
 void setExecutionMonth(int executionMonth)
           
 void setExecutionSecond(int executionSecond)
           
 void setExecutionYear(int executionYear)
           
 void setTaskPlayerNumber(int taskPlayerNumber)
           
 void setTaskType(int taskType)
           
 void setTimeTableType(int timeTableType)
           
 java.lang.String toString()
           
 boolean TryExecute(long time, Playerable[] players)
          Выполняет это задание, если это надо по расписанию
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DESCRIPTION_LEN_MAX

public static final int DESCRIPTION_LEN_MAX
See Also:
Constant Field Values

T_PLAYER_PREV

public static final transient int T_PLAYER_PREV
Типы заданий


T_PLAYER_PLAY

public static final transient int T_PLAYER_PLAY

T_PLAYER_PAUSE

public static final transient int T_PLAYER_PAUSE

T_PLAYER_STOP

public static final transient int T_PLAYER_STOP

T_PLAYER_NEXT

public static final transient int T_PLAYER_NEXT

T_PLAYER_FADE_OUT

public static final transient int T_PLAYER_FADE_OUT

T_STOP_ALL

public static final transient int T_STOP_ALL

T_FADE_OUT_ALL

public static final transient int T_FADE_OUT_ALL

E_ONCE

public static final transient int E_ONCE
Типы расписаний


E_EVERY_DAY

public static final transient int E_EVERY_DAY

E_EVERY_WEEK

public static final transient int E_EVERY_WEEK

E_EVERY_HOUR

public static final transient int E_EVERY_HOUR
Constructor Detail

Task

public Task()

Task

public Task(MultipleProperties prop)
Method Detail

getProperties

public MultipleProperties getProperties()

TryExecute

public boolean TryExecute(long time,
                          Playerable[] players)
Выполняет это задание, если это надо по расписанию

Parameters:
time - Текущее время в миллисекундах (System.getCurrentTimeMillis())
Returns:
Выполнилось ли задание

getTaskDescription

public java.lang.String getTaskDescription()

getTimeTableString

public java.lang.String getTimeTableString()

getLastExecutionString

public java.lang.String getLastExecutionString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTaskType

public int getTaskType()

setTaskType

public void setTaskType(int taskType)

getTimeTableType

public int getTimeTableType()

setTimeTableType

public void setTimeTableType(int timeTableType)

getTaskPlayerNumber

public int getTaskPlayerNumber()

setTaskPlayerNumber

public void setTaskPlayerNumber(int taskPlayerNumber)

getExecutionYear

public int getExecutionYear()

setExecutionYear

public void setExecutionYear(int executionYear)

getExecutionMonth

public int getExecutionMonth()

setExecutionMonth

public void setExecutionMonth(int executionMonth)

getExecutionDayOfMonth

public int getExecutionDayOfMonth()

setExecutionDayOfMonth

public void setExecutionDayOfMonth(int executionDayOfMonth)

getExecutionDayOfWeek

public boolean[] getExecutionDayOfWeek()

setExecutionDayOfWeek

public void setExecutionDayOfWeek(boolean[] executionDayOfWeek)

getExecutionHourOfDay

public int getExecutionHourOfDay()

setExecutionHourOfDay

public void setExecutionHourOfDay(int executionHourOfDay)

getExecutionMinute

public int getExecutionMinute()

setExecutionMinute

public void setExecutionMinute(int executionMinute)

getExecutionSecond

public int getExecutionSecond()

setExecutionSecond

public void setExecutionSecond(int executionSecond)

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)