Package de.fraunhofer.iese.mydata.timer
Interface ITimerService
-
- All Known Subinterfaces:
IBasicManagementService,IManagementService
public interface ITimerServiceThe Interface ITimerService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TimerIdaddTimer(Timer timer)Adds a timer.voiddeleteTimer(TimerId timerId)Removes the timer.voiddeployTimer(TimerId timerId)Deploys a timer at the local PDP of the solution.Set<Timer>getDeployedTimers(SolutionId solutionId)Gets all deployed timers of the solution.Set<Timer>getRevokedTimers(SolutionId solutionId)Gets all timer of the solution.TimergetTimer(TimerId timerId)Gets the timer.Set<Timer>getTimers(SolutionId solutionId)Gets all timers of the solutionbooleanisTimerDeployed(TimerId timerId)Checks if a timer is deployed.Set<TimerId>listDeployedTimers(SolutionId solutionId)Provides a list of currently deployed timers.Set<TimerId>listRevokedTimers(SolutionId solutionId)Provides a list of currently revoked timers.Set<TimerId>listTimers(SolutionId solutionId)Gets all timer ids of the solutionvoidrevokeTimer(TimerId timerId)Revokes a currently deployed timer.booleantimerExists(TimerId timerId)Timer exists.TimerIdupdateTimer(Timer timer)Updates a currently active timer.
-
-
-
Method Detail
-
addTimer
TimerId addTimer(Timer timer) throws IOException, ConflictingResourceException, ResourceUpdateException, InvalidEntityException, NoSuchEntityException
Adds a timer.- Parameters:
timer- the timer- Returns:
- true, if the timer was added successfully, false otherwise
- Throws:
IOException- Signals that an I/O exception has occurred.ConflictingResourceException- if a timer with the same id already existsResourceUpdateException- if it was not possible to add the timerInvalidEntityException- if the given timer is not validNoSuchEntityException- if the solution for the timer does not exist
-
getTimer
Timer getTimer(TimerId timerId) throws IOException, NoSuchEntityException, InvalidEntityException
Gets the timer.- Parameters:
timerId- the timer timerid- Returns:
- the latest timer
- Throws:
IOException- Signals that an I/O exception has occurred.NoSuchEntityException- the no such element exceptionInvalidEntityException- if the given timer id is not valid
-
getTimers
Set<Timer> getTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Gets all timers of the solution- Parameters:
solutionId- the solutionId- Returns:
- all timer
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
listTimers
Set<TimerId> listTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Gets all timer ids of the solution- Parameters:
solutionId- the solutionid- Returns:
- all timer IDs
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
getDeployedTimers
Set<Timer> getDeployedTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Gets all deployed timers of the solution.- Parameters:
solutionId- the solutionId- Returns:
- all timer
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
getRevokedTimers
Set<Timer> getRevokedTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Gets all timer of the solution.- Parameters:
solutionId- the solutionId- Returns:
- all timer
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
listDeployedTimers
Set<TimerId> listDeployedTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Provides a list of currently deployed timers.- Parameters:
solutionId- the solution id- Returns:
- list of currently deployed timer ids
- Throws:
IOException- communication failureInvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
listRevokedTimers
Set<TimerId> listRevokedTimers(SolutionId solutionId) throws IOException, InvalidEntityException, NoSuchEntityException
Provides a list of currently revoked timers.- Parameters:
solutionId- the solution id- Returns:
- list of currently revoked timer ids
- Throws:
IOException- communication failureInvalidEntityException- if the given solution id is not validNoSuchEntityException- if the solution does not exist
-
isTimerDeployed
boolean isTimerDeployed(TimerId timerId) throws IOException, NoSuchEntityException, InvalidEntityException
Checks if a timer is deployed.- Parameters:
timerId- the timer timerid- Returns:
- true, if is deployed
- Throws:
IOException- Signals that an I/O exception has occurred.NoSuchEntityException- the no such element exceptionInvalidEntityException- if the given timer id is not valid
-
deployTimer
void deployTimer(TimerId timerId) throws IOException, NoSuchEntityException, ResourceUpdateException, InvalidEntityException
Deploys a timer at the local PDP of the solution.- Parameters:
timerId- the timerid of the timer to be deployed. Will be retrieved via the PRP- Throws:
IOException- if connection problem occursNoSuchEntityException- timer not found in PMP databaseResourceUpdateException- if it was not possible to deploy the timerInvalidEntityException- if the given timer id is not valid
-
revokeTimer
void revokeTimer(TimerId timerId) throws IOException, NoSuchEntityException, ResourceUpdateException, InvalidEntityException
Revokes a currently deployed timer.- Parameters:
timerId- the ID of the timer to be revoked- Throws:
IOException- if connection problem occursNoSuchEntityException- the no such element exceptionResourceUpdateException- if it was not possible to remove the timerInvalidEntityException- if the given timer id is not valid
-
deleteTimer
void deleteTimer(TimerId timerId) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException, ConflictingResourceException
Removes the timer.- Parameters:
timerId- the timerId to delete- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- if it was not possible to delete the timerNoSuchEntityException- the no such element exceptionInvalidEntityException- if the given timer id is not validConflictingResourceException- if the timer to be deleted is deployed
-
updateTimer
TimerId updateTimer(Timer timer) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException, ConflictingResourceException
Updates a currently active timer.- Parameters:
timer- the timer to be updated- Returns:
- the timer id
- Throws:
IOExceptionResourceUpdateException- if it was not possible to update the timerNoSuchEntityExceptionInvalidEntityException- if the given timer is not validConflictingResourceException
-
timerExists
boolean timerExists(TimerId timerId) throws IOException, InvalidEntityException
Timer exists.- Parameters:
timerId- the timer id- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityException- if the given timer id is not valid
-
-