Package de.fraunhofer.iese.mydata.timer
Interface ITimerService
- All Known Subinterfaces:
IBasicManagementService
,IManagementService
public interface ITimerService
The Interface ITimerService.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a timer.void
deleteTimer
(TimerId timerId) Removes the timer.void
deployTimer
(TimerId timerId) Deploys a timer at the local PDP of the solution.getDeployedTimers
(SolutionId solutionId) Gets all deployed timers of the solution.getRevokedTimers
(SolutionId solutionId) Gets all timer of the solution.Gets the timer.getTimers
(SolutionId solutionId) Gets all timers of the solutionboolean
isTimerDeployed
(TimerId timerId) Checks if a timer is deployed.listDeployedTimers
(SolutionId solutionId) Provides a list of currently deployed timers.listRevokedTimers
(SolutionId solutionId) Provides a list of currently revoked timers.listTimers
(SolutionId solutionId) Gets all timer ids of the solutionvoid
revokeTimer
(TimerId timerId) Revokes a currently deployed timer.boolean
timerExists
(TimerId timerId) Timer exists.updateTimer
(Timer timer) Updates a currently active timer.
-
Method Details
-
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
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:
IOException
ResourceUpdateException
- if it was not possible to update the timerNoSuchEntityException
InvalidEntityException
- if the given timer is not validConflictingResourceException
-
timerExists
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
-