org.onebusaway.api.actions.api
Class ApiKeyInterceptor

java.lang.Object
  extended by com.opensymphony.xwork2.interceptor.AbstractInterceptor
      extended by org.onebusaway.api.actions.api.ApiKeyInterceptor
All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor, Serializable

public class ApiKeyInterceptor
extends com.opensymphony.xwork2.interceptor.AbstractInterceptor

Ensures that there is a valid API key for the API request, and that a given API key is not used more frequently than it is permitted to.

See Also:
Serialized Form

Constructor Summary
ApiKeyInterceptor()
           
 
Method Summary
 ApiKeyPermissionService getKeyService()
           
 String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
           
 void setKeyService(ApiKeyPermissionService _keyService)
           
 void setMimeTypeHandlerSelector(org.apache.struts2.rest.ContentTypeHandlerManager sel)
           
 
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiKeyInterceptor

public ApiKeyInterceptor()
Method Detail

setMimeTypeHandlerSelector

public void setMimeTypeHandlerSelector(org.apache.struts2.rest.ContentTypeHandlerManager sel)

intercept

public String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                 throws Exception
Specified by:
intercept in interface com.opensymphony.xwork2.interceptor.Interceptor
Specified by:
intercept in class com.opensymphony.xwork2.interceptor.AbstractInterceptor
Throws:
Exception

setKeyService

public void setKeyService(ApiKeyPermissionService _keyService)

getKeyService

public ApiKeyPermissionService getKeyService()


Copyright © 2011 OneBusAway. All Rights Reserved.