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 |
|---|---|
void |
addStaticHeaders(java.util.Map<java.lang.String,java.lang.String> staticHeaders)
Adds a new map with static headers.
|
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.
|
HookTriggerType |
getHookTriggerType()
Retuns the trigger type of the hook.
|
java.util.List<java.lang.String> |
getMethods()
Returns the methods which should pass the hook.
|
int |
getQueueExpireAfter()
Gets the expiry (x-queue-expire-after header)
for the requests in the queue send to the
listener.
|
java.util.Map<java.lang.String,java.lang.String> |
getStaticHeaders()
Returns the map with the static headers for this
hook.
|
boolean |
isCollection()
Indicates if a hook points to a collection (default: true)
or not.
|
boolean |
isFullUrl()
Returns whether the hook forwards using the full initial url or only the appendix.
|
boolean |
isListable()
Indicates if a route hook should be listed
for a GET request or not.
|
void |
setCollection(boolean collection)
Sets if a hook points to a collection (default: true)
or not.
|
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 |
setHookTriggerType(HookTriggerType hookTriggerType)
Sets the trigger type of the hook.
|
void |
setListable(boolean listable)
Sets if a route hook should be listed
for a GET request or not.
|
void |
setMethods(java.util.List<java.lang.String> methods)
Sets the methods which should pass the hook.
|
void |
setQueueExpireAfter(int queueExpireAfter)
Sets the expiry (x-queue-expire-after header)
for the requests in the queue send to the
listener.
|
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 expressionpublic int getQueueExpireAfter()
public void setQueueExpireAfter(int queueExpireAfter)
queueExpireAfter - - a value in secondspublic void addStaticHeaders(java.util.Map<java.lang.String,java.lang.String> staticHeaders)
staticHeaders - - a map with static headerspublic java.util.Map<java.lang.String,java.lang.String> getStaticHeaders()
public HookTriggerType getHookTriggerType()
public void setHookTriggerType(HookTriggerType hookTriggerType)
hookTriggerType - the trigger type of the hookpublic boolean isListable()
public void setListable(boolean listable)
listable - true if the route hook should be listedpublic boolean isCollection()
public void setCollection(boolean collection)
collection - true (default) if hook points to collection.