public abstract class Call extends Object
These values are usually generated by the reverse router.
Constructor and Description |
---|
Call() |
Modifier and Type | Method and Description |
---|---|
String |
absoluteURL(boolean secure,
String host)
Transform this call to an absolute URL.
|
String |
absoluteURL(Http.Request request)
Transform this call to an absolute URL.
|
String |
absoluteURL(Http.Request request,
boolean secure)
Transform this call to an absolute URL.
|
protected String |
appendFragment()
Returns the fragment (including the leading "#") if this call has one.
|
String |
canonical()
Transform this path into its canonical form.
|
abstract String |
fragment()
The fragment of the URL.
|
abstract String |
method()
The request HTTP method.
|
String |
path() |
String |
relativeTo(Http.RequestHeader requestHeader)
Transform this call to a relative path.
|
String |
relativeTo(String startPath)
Transform this call to a relative path.
|
String |
toString() |
Call |
unique()
Append a unique identifier to the URL.
|
protected String |
uniquify(String url) |
abstract String |
url()
The request URL.
|
String |
webSocketURL(boolean secure,
String host)
Transform this call to an WebSocket URL.
|
String |
webSocketURL(Http.Request request)
Transform this call to an WebSocket URL.
|
String |
webSocketURL(Http.Request request,
boolean secure)
Transform this call to an WebSocket URL.
|
Call |
withFragment(String fragment)
Returns a new Call with the given fragment.
|
public abstract String url()
public abstract String method()
public abstract String fragment()
public Call unique()
public Call withFragment(String fragment)
fragment
- the URL fragmentprotected String appendFragment()
public String absoluteURL(Http.Request request)
request
- used to identify the host and protocol that should base this absolute URLpublic String absoluteURL(Http.Request request, boolean secure)
request
- used to identify the host that should base this absolute URLsecure
- true if the absolute URL should use HTTPS protocolpublic String absoluteURL(boolean secure, String host)
secure
- true if the absolute URL should use HTTPS protocol instead of HTTPhost
- the absolute URL's domainpublic String webSocketURL(Http.Request request)
request
- used as the base for forming the WS urlpublic String webSocketURL(Http.Request request, boolean secure)
request
- used to identify the host for the absolute URLsecure
- true if it should be a wss rather than ws URLpublic String webSocketURL(boolean secure, String host)
host
- the host for the absolute URL.secure
- true if it should be a wss rather than ws URLpublic String relativeTo(Http.RequestHeader requestHeader)
requestHeader
- used to identify the current URL to make this Call relative to.public String relativeTo(String startPath)
startPath
- the URL to make this Call relative to.public String canonical()
public String path()