Class RestManager.ManagedEndpoint

  • All Implemented Interfaces:
    DELETEable, GETable, POSTable, PUTable
    Enclosing class:
    RestManager

    public static class RestManager.ManagedEndpoint
    extends BaseSolrResource
    implements GETable, PUTable, POSTable, DELETEable
    The Restlet router needs a lightweight extension of ServerResource to delegate a request to. ManagedResource implementations are heavy-weight objects that live for the duration of a SolrCore, so this class acts as the proxy between Restlet and a ManagedResource when doing request processing.
    • Constructor Summary

      Constructors 
      Constructor Description
      ManagedEndpoint()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addDeprecatedWarning()  
      org.restlet.representation.Representation delete()  
      void doInit()
      Initialize objects needed to handle a request to the REST API.
      org.restlet.representation.Representation get()  
      protected Object parseJsonFromRequestBody​(org.restlet.representation.Representation entity)
      Parses and validates the JSON passed from the to the ManagedResource.
      org.restlet.representation.Representation post​(org.restlet.representation.Representation entity)  
      org.restlet.representation.Representation put​(org.restlet.representation.Representation entity)  
      static String resolveResourceId​(org.restlet.Request restletReq)
      Determines the ManagedResource resourceId from the Restlet request.
      • Methods inherited from class org.restlet.resource.ServerResource

        abort, commit, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, getAttribute, getDescription, getInfo, getInfo, getName, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDescription, setDimensions, setExisting, setLocationRef, setLocationRef, setName, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
      • Methods inherited from class org.restlet.resource.Resource

        doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
    • Constructor Detail

      • ManagedEndpoint

        public ManagedEndpoint()
    • Method Detail

      • resolveResourceId

        public static String resolveResourceId​(org.restlet.Request restletReq)
        Determines the ManagedResource resourceId from the Restlet request.
      • doInit

        public void doInit()
                    throws org.restlet.resource.ResourceException
        Initialize objects needed to handle a request to the REST API. Specifically, we lookup the RestManager using the ThreadLocal SolrRequestInfo and then dynamically locate the ManagedResource associated with the request URI.
        Overrides:
        doInit in class BaseSolrResource
        Throws:
        org.restlet.resource.ResourceException
      • put

        public org.restlet.representation.Representation put​(org.restlet.representation.Representation entity)
        Specified by:
        put in interface PUTable
        Overrides:
        put in class org.restlet.resource.ServerResource
      • post

        public org.restlet.representation.Representation post​(org.restlet.representation.Representation entity)
        Specified by:
        post in interface POSTable
        Overrides:
        post in class org.restlet.resource.ServerResource
      • delete

        public org.restlet.representation.Representation delete()
        Specified by:
        delete in interface DELETEable
        Overrides:
        delete in class org.restlet.resource.ServerResource
      • get

        public org.restlet.representation.Representation get()
        Specified by:
        get in interface GETable
        Overrides:
        get in class org.restlet.resource.ServerResource
      • parseJsonFromRequestBody

        protected Object parseJsonFromRequestBody​(org.restlet.representation.Representation entity)
        Parses and validates the JSON passed from the to the ManagedResource.