Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service.servlet;
 
 
 
public class StoreListServlet<K extends EntryKey,
    E extends StoredEntry<K>
    extends ServletBase
    /*
    /**********************************************************************
    /* Helper objects
    /**********************************************************************
     */
        
//        private final Log LOG = Log.forClass(getClass());
    protected final StoreHandler<K,E,?> _storeHandler;
    protected final TimeMaster _timeMaster;
    protected final EntryKeyConverter<K> _keyConverter;
    /*
    /**********************************************************************
    /* Life-cycle
    /**********************************************************************
     */
    public StoreListServlet(SharedServiceStuff stuffClusterViewByServer clusterView,
            StoreHandler<K,E,?> storeHandler)
    {
        // null -> use servlet path base as-is
        super(clusterViewnull);
         = storeHandler;
         = stuff.getTimeMaster();
         = stuff.getKeyConverter();
    }
    /*
    /**********************************************************************
    /* Default implementation for key handling
    /**********************************************************************
     */
    protected K _findKey(ServletServiceRequest requestServletServiceResponse response)
    {
        return .extractFromPath(request);
    }
    
    /*
    /**********************************************************************
    /* Delegated methods for more control
    /**********************************************************************
     */
    @Override
    public void handleGet(ServletServiceRequest requestServletServiceResponse response,
            OperationDiagnostics statsthrows IOException
    {
        K prefix = _findKey(requestresponse);
        if (prefix == null) {
            super.handleGet(requestresponsestats);
            return;
        }
        .listEntries(requestresponseprefixstats);
        _addStdHeaders(response);
        response.writeOut(null);
    }
New to GrepCode? Check out our FAQ X