public interface RaceNotificationSession extends OsidSession
This session defines methods to receive notifications on new or deleted races. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.
This session registers notifications for the Race itself.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForRaceNotifications()
Tests if this user can register for
Race notifications. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
registerForChangedRace(Id raceId)
Registers for notification of an updated race.
|
void |
registerForChangedRaces()
Register for notifications of new races.
|
void |
registerForChangedRacesForBallot(Id ballotId)
Registers for notification of updated races for a ballot.
|
void |
registerForDeletedRace(Id raceId)
Registers for notification of a deleted race.
|
void |
registerForDeletedRaces()
Registers for notification of deleted races.
|
void |
registerForDeletedRacesForBallot(Id ballotId)
Registers for notification of deleted races for ballot.
|
void |
registerForNewRaces()
Register for notifications of new races.
|
void |
registerForNewRacesForBallot(Id ballotId)
Register for notifications of new races for a ballot.
|
void |
useFederatedPollsView()
Federates the view for methods in this session.
|
void |
useIsolatedPollsView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPollsId()
Polls
Id
associated with this
session. Polls Id
associated with this sessionmandatory
- This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls
associated with this session. Polls
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForRaceNotifications()
Race
notifications.
A return of true does not guarantee successful authorization. A return
of false indicates that it is known all methods in this session will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer notification
operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedPollsView()
mandatory
- This method is must be implemented. void useIsolatedPollsView()
mandatory
- This method is must be implemented. void registerForNewRaces() throws OperationFailedException, PermissionDeniedException
RaceReceiver.newRaces()
is invoked when a new Race
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRacesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
RaceReceiver.newRaces()
is invoked when a new Race
is created.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRaces() throws OperationFailedException, PermissionDeniedException
RaceReceiver.changedRaces()
is invoked when a Race
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRacesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
RaceReceiver.changedRaces()
is invoked when the specified race
in this polls is changed.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRace(Id raceId) throws OperationFailedException, PermissionDeniedException
RaceReceiver.changedRaces()
is invoked when the specified race
in this polls is changed.raceId
- the Id
of the Race
to
monitorNullArgumentException
- raceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRaces() throws OperationFailedException, PermissionDeniedException
RaceReceiver.deletedRaces()
is invoked when a race is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRacesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
RaceReceiver.deletedRaces()
is invoked when the specified race
is deleted or removed from this polls.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRace(Id raceId) throws OperationFailedException, PermissionDeniedException
RaceReceiver.deletedRaces()
is invoked when the specified race
is deleted or removed from this polls.raceId
- the Id
of the Race
to
monitorNullArgumentException
- raceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.