org.springframework.yarn.batch.repository
Class BatchAppmasterService.JobRepositoryServiceInterceptorList

java.lang.Object
  extended by org.springframework.yarn.batch.repository.BatchAppmasterService.JobRepositoryServiceInterceptorList
Enclosing class:
BatchAppmasterService

protected class BatchAppmasterService.JobRepositoryServiceInterceptorList
extends Object

Convenient wrapper for interceptor list.


Constructor Summary
protected BatchAppmasterService.JobRepositoryServiceInterceptorList()
           
 
Method Summary
 boolean add(JobRepositoryRemoteServiceInterceptor interceptor)
          Adds interceptor to the list.
 org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject handleRequest(org.springframework.yarn.integration.ip.mind.binding.BaseObject baseObject)
          Handles the handleRequest calls.
 org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject postRequest(org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject baseResponseObject)
          Handles he post request calls.
 org.springframework.yarn.integration.ip.mind.binding.BaseObject preRequest(org.springframework.yarn.integration.ip.mind.binding.BaseObject baseObject)
          Handles the pre request calls.
 boolean set(List<JobRepositoryRemoteServiceInterceptor> interceptors)
          Sets the interceptors, clears any existing interceptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchAppmasterService.JobRepositoryServiceInterceptorList

protected BatchAppmasterService.JobRepositoryServiceInterceptorList()
Method Detail

set

public boolean set(List<JobRepositoryRemoteServiceInterceptor> interceptors)
Sets the interceptors, clears any existing interceptors.

Parameters:
interceptors - the list of interceptors
Returns:
true if interceptor list changed as a result of the call

add

public boolean add(JobRepositoryRemoteServiceInterceptor interceptor)
Adds interceptor to the list.

Parameters:
interceptor - the interceptor
Returns:
true (as specified by Collection.add(E))

preRequest

public org.springframework.yarn.integration.ip.mind.binding.BaseObject preRequest(org.springframework.yarn.integration.ip.mind.binding.BaseObject baseObject)
Handles the pre request calls.

Parameters:
baseObject - the base request object
Returns:
the final modified request or null if interceptor broke the chain

handleRequest

public org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject handleRequest(org.springframework.yarn.integration.ip.mind.binding.BaseObject baseObject)
Handles the handleRequest calls. Method returns immediately if one of the interceptors chooses to process the request.

Parameters:
baseObject - the base request object
Returns:
the processed request if any, null if no processing

postRequest

public org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject postRequest(org.springframework.yarn.integration.ip.mind.binding.BaseResponseObject baseResponseObject)
Handles he post request calls.

Parameters:
baseResponseObject - the base response object
Returns:
the final modified response