Package org.analogweb.core
Class DefaultRequestPath
- java.lang.Object
-
- org.analogweb.core.AbstractRequestPathMetadata
-
- org.analogweb.core.DefaultRequestPath
-
- All Implemented Interfaces:
RequestPath
,RequestPathMetadata
public class DefaultRequestPath extends AbstractRequestPathMetadata implements RequestPath
Default implementation ofRequestPath
.- Author:
- y2k2mt
-
-
Constructor Summary
Constructors Constructor Description DefaultRequestPath(URI baseURI, URI requestedURI, String requestMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
String
getActualPath()
Obtain defined path.URI
getBaseURI()
Application's contextURI
.String
getRequestMethod()
Requested HTTP method.List<String>
getRequestMethods()
Obtain defined (HTTP) request methods.URI
getRequestURI()
Actually requestedURI
.int
hashCode()
boolean
match(RequestPath requestPath)
Check ownRequestPath
match assigned one.String
toString()
-
-
-
Method Detail
-
getActualPath
public String getActualPath()
Description copied from interface:RequestPathMetadata
Obtain defined path.- Specified by:
getActualPath
in interfaceRequestPathMetadata
- Returns:
- path
-
match
public boolean match(RequestPath requestPath)
Description copied from interface:RequestPathMetadata
Check ownRequestPath
match assigned one.- Specified by:
match
in interfaceRequestPathMetadata
- Parameters:
requestPath
-RequestPath
- Returns:
true
- if matchedRequestPath
-
getRequestMethod
public String getRequestMethod()
Description copied from interface:RequestPath
Requested HTTP method.- Specified by:
getRequestMethod
in interfaceRequestPath
- Returns:
- Requested HTTP method.
-
getRequestMethods
public List<String> getRequestMethods()
Description copied from interface:RequestPathMetadata
Obtain defined (HTTP) request methods.- Specified by:
getRequestMethods
in interfaceRequestPathMetadata
- Returns:
- request methods
-
getRequestURI
public URI getRequestURI()
Description copied from interface:RequestPath
Actually requestedURI
.- Specified by:
getRequestURI
in interfaceRequestPath
- Returns:
URI
-
getBaseURI
public URI getBaseURI()
Description copied from interface:RequestPath
- Specified by:
getBaseURI
in interfaceRequestPath
- Returns:
URI
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classAbstractRequestPathMetadata
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractRequestPathMetadata
-
-