Package org.lockss.laaws.poller.impl
Class PollsApiServiceImpl
java.lang.Object
org.lockss.laaws.poller.impl.PollsApiServiceImpl
- All Implemented Interfaces:
PollsApiDelegate
The Polls api service.
-
Field Summary
Fields inherited from interface org.lockss.laaws.poller.api.PollsApiDelegate
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>callPoll(org.lockss.util.rest.poller.PollDesc body) Call a new pollorg.springframework.http.ResponseEntity<Void>cancelPoll(String psId) Cancel Poll a previously called pollorg.springframework.http.ResponseEntity<PollerDetail>getPollerPollDetails(String pollKey) Get the detailed description of a Poller poll.org.springframework.http.ResponseEntity<UrlPager>Get a Participant peers's urls for a Pollerorg.springframework.http.ResponseEntity<PollerPager>getPollsAsPoller(Integer size, Integer page) Get the Polls for which we are the poller.org.springframework.http.ResponseEntity<VoterPager>getPollsAsVoter(Integer size, Integer page) Get the Polls for which we are only a voter.org.springframework.http.ResponseEntity<PollerSummary>getPollStatus(String psId) Return the current status of a poll.org.springframework.http.ResponseEntity<RepairPager>getRepairQueueData(String pollKey, String repair, Integer page, Integer size) Return details of form the RepairQueue of a called poll.org.springframework.http.ResponseEntity<UrlPager>getTallyUrls(String pollKey, String tally, Integer page, Integer size) Return the Tallied Urls.org.springframework.http.ResponseEntity<VoterDetail>getVoterPollDetails(String pollKey) Get the detailed description of a Poller poll.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lockss.laaws.poller.api.PollsApiDelegate
getAcceptHeader, getObjectMapper, getRequest
-
Constructor Details
-
PollsApiServiceImpl
public PollsApiServiceImpl()
-
-
Method Details
-
callPoll
public org.springframework.http.ResponseEntity<String> callPoll(org.lockss.util.rest.poller.PollDesc body) Call a new poll- Specified by:
callPollin interfacePollsApiDelegate- Parameters:
body- a description of the poll to call- Returns:
- the identifier for this poll.
- See Also:
-
cancelPoll
Cancel Poll a previously called poll- Specified by:
cancelPollin interfacePollsApiDelegate- Parameters:
psId- the poll service id of the called poll- Returns:
- Void.
- See Also:
-
getPollStatus
Return the current status of a poll.- Specified by:
getPollStatusin interfacePollsApiDelegate- Parameters:
psId- The poll service id of the called poll- Returns:
- A summary of the current Polls status.
- See Also:
-
getPollerPollDetails
Get the detailed description of a Poller poll.- Specified by:
getPollerPollDetailsin interfacePollsApiDelegate- Parameters:
pollKey- the PollKey assigned by the Poll Manager- Returns:
- A PollerPoll detail.
- See Also:
-
getVoterPollDetails
Get the detailed description of a Poller poll.- Specified by:
getVoterPollDetailsin interfacePollsApiDelegate- Parameters:
pollKey- the PollKey assigned by the Poll Manager- Returns:
- A VoterPoll detail.
- See Also:
-
getPollPeerVoteUrls
public org.springframework.http.ResponseEntity<UrlPager> getPollPeerVoteUrls(String pollKey, String peerId, String urls, Integer page, Integer size) Get a Participant peers's urls for a Poller- Specified by:
getPollPeerVoteUrlsin interfacePollsApiDelegate- Parameters:
pollKey- the PollKey assigned by the Poll ManagerpeerId- the id of the peerurls- the type of urls to returnpage- the page number of the paged resultssize- the size of the page.- Returns:
- A UrlPager of paged urls.
- See Also:
-
getRepairQueueData
public org.springframework.http.ResponseEntity<RepairPager> getRepairQueueData(String pollKey, String repair, Integer page, Integer size) Return details of form the RepairQueue of a called poll.- Specified by:
getRepairQueueDatain interfacePollsApiDelegate- Parameters:
pollKey- the PollKey assigned by the Poll Managerrepair- the kind of repair data to return.page- the page number of the paged resultssize- the size of the page.- Returns:
- A RepairPager of the current page of urls.
- See Also:
-
getTallyUrls
public org.springframework.http.ResponseEntity<UrlPager> getTallyUrls(String pollKey, String tally, Integer page, Integer size) Return the Tallied Urls.- Specified by:
getTallyUrlsin interfacePollsApiDelegate- Parameters:
pollKey- the PollKey assigned by the Poll Managertally- the kind of tally data to return.page- the page number of the paged resultssize- the size of the page.- Returns:
- A UrlPager of paged urls.
- See Also:
-
getPollsAsPoller
public org.springframework.http.ResponseEntity<PollerPager> getPollsAsPoller(Integer size, Integer page) Get the Polls for which we are the poller.- Specified by:
getPollsAsPollerin interfacePollsApiDelegate- Parameters:
page- the page number of the paged resultssize- the size of the page.- Returns:
- A PollPager used to page in the PollerSummary objects.
- See Also:
-
getPollsAsVoter
public org.springframework.http.ResponseEntity<VoterPager> getPollsAsVoter(Integer size, Integer page) Get the Polls for which we are only a voter.- Specified by:
getPollsAsVoterin interfacePollsApiDelegate- Parameters:
page- the page number of the paged resultssize- the size of the page.- Returns:
- A VoterPager used to page in the VoterSummary objects.
- See Also:
-