Class CrossOriginResourceSharing
java.lang.Object
ecmwf.ecpds.mover.plugin.http.CrossOriginResourceSharing
The Class CrossOriginResourceSharing.
- Author:
- root
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Collection
<String> The Constant SUPPORTED_METHODS. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new cross origin resource sharing.CrossOriginResourceSharing
(Collection<String> allowedOrigins, Collection<String> allowedMethods, Collection<String> allowedHeaders) Instantiates a new cross origin resource sharing. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Equals.Gets the allowed methods.getAllowedOrigin
(String origin) Gets the allowed origin.int
hashCode()
Hash code.boolean
isEveryHeaderAllowed
(String headers) Checks if is every header allowed.boolean
isMethodAllowed
(String method) Checks if is method allowed.boolean
isOriginAllowed
(String origin) Checks if is origin allowed.
-
Field Details
-
SUPPORTED_METHODS
The Constant SUPPORTED_METHODS.
-
-
Constructor Details
-
CrossOriginResourceSharing
public CrossOriginResourceSharing()Instantiates a new cross origin resource sharing. -
CrossOriginResourceSharing
public CrossOriginResourceSharing(Collection<String> allowedOrigins, Collection<String> allowedMethods, Collection<String> allowedHeaders) Instantiates a new cross origin resource sharing.- Parameters:
allowedOrigins
- the allowed originsallowedMethods
- the allowed methodsallowedHeaders
- the allowed headers
-
-
Method Details
-
getAllowedMethods
-
getAllowedOrigin
-
isOriginAllowed
Checks if is origin allowed.- Parameters:
origin
- the origin- Returns:
- true, if is origin allowed
-
isMethodAllowed
Checks if is method allowed.- Parameters:
method
- the method- Returns:
- true, if is method allowed
-
isEveryHeaderAllowed
Checks if is every header allowed.- Parameters:
headers
- the headers- Returns:
- true, if is every header allowed
-
equals
-
hashCode
-