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