org.kuali.student.common.ui.server.gwt
Class SearchDispatchRpcGwtServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.kuali.student.common.ui.server.gwt.SearchDispatchRpcGwtServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, Servlet, ServletConfig, SearchRpcService, InitializingBean

public class SearchDispatchRpcGwtServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements SearchRpcService, InitializingBean

See Also:
Serialized Form

Nested Class Summary
 class SearchDispatchRpcGwtServlet.MaxAgeSoftReference<T>
          An extension to SoftReference that stores an expiration time for the value stored in the SoftReference.
 class SearchDispatchRpcGwtServlet.MaxSizeMap<K,V>
          This class acts like an LRU cache, automatically purging contents when it gets above a certain size.
 
Field Summary
protected  boolean cachingEnabled
           
private  IdTranslatorFilter idTranslatorFilter
           
protected  Map<String,SearchDispatchRpcGwtServlet.MaxAgeSoftReference<SearchResult>> searchCache
           
protected  int searchCacheMaxAgeSeconds
           
protected  int searchCacheMaxSize
           
private  SearchDispatcher searchDispatcher
           
private static long serialVersionUID
           
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
SearchDispatchRpcGwtServlet()
           
 
Method Summary
 void afterPropertiesSet()
           
 SearchResult cachingSearch(SearchRequest searchRequest)
           
private  void doIdTranslation(SearchResult searchResult)
           
 SearchResult search(SearchRequest searchRequest)
          Delegates to the service responsible for the given search type key
 void setCachingEnabled(boolean cachingEnabled)
           
 void setIdTranslatorFilter(IdTranslatorFilter idTranslatorFilter)
           
 void setSearchCacheMaxAgeSeconds(int searchCacheMaxAgeSeconds)
           
 void setSearchCacheMaxSize(int searchCacheMaxSize)
           
 void setSearchDispatcher(SearchDispatcher searchDispatcher)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

idTranslatorFilter

private IdTranslatorFilter idTranslatorFilter

searchDispatcher

private SearchDispatcher searchDispatcher

cachingEnabled

protected boolean cachingEnabled

searchCacheMaxSize

protected int searchCacheMaxSize

searchCacheMaxAgeSeconds

protected int searchCacheMaxAgeSeconds

searchCache

protected Map<String,SearchDispatchRpcGwtServlet.MaxAgeSoftReference<SearchResult>> searchCache
Constructor Detail

SearchDispatchRpcGwtServlet

public SearchDispatchRpcGwtServlet()
Method Detail

search

public SearchResult search(SearchRequest searchRequest)
Delegates to the service responsible for the given search type key

Specified by:
search in interface SearchRpcService
Parameters:
searchRequest -
Returns:
The searchResult from the delegated search or null
Throws:
MissingParameterException

cachingSearch

public SearchResult cachingSearch(SearchRequest searchRequest)
Specified by:
cachingSearch in interface SearchRpcService

doIdTranslation

private void doIdTranslation(SearchResult searchResult)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

setSearchDispatcher

public void setSearchDispatcher(SearchDispatcher searchDispatcher)

setIdTranslatorFilter

public void setIdTranslatorFilter(IdTranslatorFilter idTranslatorFilter)

setCachingEnabled

public void setCachingEnabled(boolean cachingEnabled)

setSearchCacheMaxSize

public void setSearchCacheMaxSize(int searchCacheMaxSize)

setSearchCacheMaxAgeSeconds

public void setSearchCacheMaxAgeSeconds(int searchCacheMaxAgeSeconds)


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.