Package com.aspectran.web.support.cors
Interface CorsProcessor
-
- All Known Implementing Classes:
AbstractCorsProcessor
,DefaultCorsProcessor
public interface CorsProcessor
Process an incoming cross-origin (CORS) requests. Encapsulates the CORS processing logic as specified by the W3C candidate recommendation from 2013-01-29.- Since:
- 2.3.0
- See Also:
- CORS W3C recommandation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
processActualRequest(Translet translet)
Process a simple or actual CORS request.void
processPreflightRequest(Translet translet)
Process a preflight CORS request.void
sendError(Translet translet)
Sends an error response to the client using the specified status.
-
-
-
Method Detail
-
processActualRequest
void processActualRequest(Translet translet) throws CorsException, java.io.IOException
Process a simple or actual CORS request.- Parameters:
translet
- the Translet instance- Throws:
CorsException
- if the request is invalid or deniedjava.io.IOException
- in case of I/O errors
-
processPreflightRequest
void processPreflightRequest(Translet translet) throws CorsException, java.io.IOException
Process a preflight CORS request.CORS specification: PreflightRequest
- Parameters:
translet
- the Translet instance- Throws:
CorsException
- if the request is invalid or deniedjava.io.IOException
- in case of I/O errors
-
sendError
void sendError(Translet translet) throws java.io.IOException
Sends an error response to the client using the specified status.- Parameters:
translet
- the Translet instance- Throws:
java.io.IOException
- in case of I/O errors
-
-