public class HttpHook
extends java.lang.Object
| Constructor and Description |
|---|
HttpHook(java.lang.String destination)
Creates a new hook.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDestination()
The destination of the hook.
|
org.joda.time.LocalDateTime |
getExpirationTime()
Returns the expiration time of this hook.
|
int |
getExpireAfter()
Gets the expiry (x-expire-after header)
for the requests send to the listener.
|
java.util.regex.Pattern |
getFilter()
Returns the precompiled pattern, to match
a given url.
|
java.util.List<java.lang.String> |
getMethods()
Returns the methods which should pass the hook.
|
boolean |
isFullUrl()
Returns whether the hook forwards using the full initial url or only the appendix.
|
void |
setDestination(java.lang.String destination)
Sets the destination of the hook.
|
void |
setExpirationTime(org.joda.time.LocalDateTime expirationTime)
Sets the expiration time of this hook.
|
void |
setExpireAfter(int expireAfter)
Sets the expiry (x-expire-after header)
for the requests send to the listener.
|
void |
setFilter(java.lang.String regex)
Set a regexp to filter the hook.
|
void |
setFullUrl(boolean fullUrl)
Sets whether the hook forwards using the full initial url or only the appendix.
|
void |
setMethods(java.util.List<java.lang.String> methods)
Sets the methods which should pass the hook.
|
public HttpHook(java.lang.String destination)
destination - destinationpublic java.lang.String getDestination()
public void setDestination(java.lang.String destination)
destination - destinationpublic java.util.List<java.lang.String> getMethods()
public void setMethods(java.util.List<java.lang.String> methods)
methods - a list of HTTP methods or empty, if all methods do pass.public int getExpireAfter()
public void setExpireAfter(int expireAfter)
expireAfter - - a value in secondspublic org.joda.time.LocalDateTime getExpirationTime()
public void setExpirationTime(org.joda.time.LocalDateTime expirationTime)
expirationTime - expirationTimepublic boolean isFullUrl()
public void setFullUrl(boolean fullUrl)
fullUrl - fullUrlpublic java.util.regex.Pattern getFilter()
public void setFilter(java.lang.String regex)
regex - - a regular expression