restgroupsServer
Class MailboxNonBlockingResource

java.lang.Object
  extended by org.restlet.resource.UniformResource
      extended by org.restlet.resource.ServerResource
          extended by restgroupsServer.BaseResource
              extended by restgroupsServer.MailboxNonBlockingResource

public class MailboxNonBlockingResource
extends BaseResource

This class handles operations executed on the "/groups/{privateGroupName}/mailbox/nonblocking" resource (or simply "/groups/{privateGroupName}/mailbox" resource). The GET retrieveMessages() method checks for new messages. Opposed to the MailboxBlockingResource processing of the request is not suspended when there are no new messages. The response containing either list of new messages or empty list is send immediately back to the client.

Author:
tkob

Field Summary
 
Fields inherited from class restgroupsServer.BaseResource
mySession
 
Constructor Summary
MailboxNonBlockingResource()
           
 
Method Summary
 org.restlet.representation.Representation retrieveMessages()
          The client calling this GET method receives a list of new messages or an empty if no new messages arrived since the mailbox was checked out for the last time either though this or MailboxBlockingResource resource.
 
Methods inherited from class restgroupsServer.BaseResource
doInit, getFactory, getProfileEntities, getProfileEntitiesThreadIDs, getProfilesPilotEntities, getRequestSessionId, printProfileEntities, printProfilesPilotEntities, setResponseSessionId
 
Methods inherited from class org.restlet.resource.ServerResource
delete, delete, describeVariants, doConditionalHandle, doHandle, doHandle, doNegotiatedHandle, get, get, getConverterService, getInfo, getInfo, getMetadataService, getPreferredVariant, getVariants, handle, head, head, isAnnotated, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setChallengeRequests, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
 
Methods inherited from class org.restlet.resource.UniformResource
doCatch, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getContext, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMethod, getOriginalRef, getProtocol, getQuery, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestEntity, getResponse, getResponseAttributes, getResponseEntity, getRootRef, getServerInfo, getStatus, init, isConfidential, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailboxNonBlockingResource

public MailboxNonBlockingResource()
Method Detail

retrieveMessages

@Get(value="xml")
public org.restlet.representation.Representation retrieveMessages()
The client calling this GET method receives a list of new messages or an empty if no new messages arrived since the mailbox was checked out for the last time either though this or MailboxBlockingResource resource.

Returns:
XML representation containing list of new messages or empty list if no new messages arrived since the mailbox was checked out for the last time