Groovy Documentation

javaposse.jobdsl.dsl.helpers
[Groovy] Class UrlTriggerEntryContext

java.lang.Object
  javaposse.jobdsl.dsl.helpers.UrlTriggerEntryContext
All Implemented Interfaces:
Context

class UrlTriggerEntryContext

Configuration container for a monitored URL.


Nested Class Summary
enum UrlTriggerEntryContext.Check

Enumeration of defined checks

 
Property Summary
java.util.EnumSet checks

java.lang.Object inspections

java.lang.Object proxyActivated

java.lang.Object statusCode

java.lang.Object timeout

java.lang.Object url

 
Constructor Summary
UrlTriggerEntryContext(java.lang.String url)

Creates a new entry for a monitored URL.

 
Method Summary
java.lang.Object check(java.lang.String performCheck)

Enables checks to perform for URL.

java.lang.Object inspection(java.lang.String type, groovy.lang.Closure inspectionClosure = null)

Adds inspections of the returned content.

java.lang.Object proxy(boolean active)

Enables/Disables the use of the global proxy that is configured for Jenkins.

java.lang.Object status(int statusCode)

Define the expected status code of the response.

java.lang.Object timeout(long timeout)

Defines how many seconds the trigger will wait when checking the URL.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

checks

java.util.EnumSet checks


inspections

java.lang.Object inspections


proxyActivated

java.lang.Object proxyActivated


statusCode

java.lang.Object statusCode


timeout

java.lang.Object timeout


url

java.lang.Object url


 
Constructor Detail

UrlTriggerEntryContext

UrlTriggerEntryContext(java.lang.String url)
Creates a new entry for a monitored URL.
Parameters:
url - Required URL to monitor


 
Method Detail

check

java.lang.Object check(java.lang.String performCheck)
Enables checks to perform for URL. Can be one of: 'status' (Check status code) 'etag' (Check the ETag) 'lastModified' (Check the last modified date)
Parameters:
performCheck - check to perform


inspection

java.lang.Object inspection(java.lang.String type, groovy.lang.Closure inspectionClosure = null)
Adds inspections of the returned content. Can be one of: 'change' 'json' 'xml' 'text'
Parameters:
type - type of inspection to use
inspectionClosure - for configuring RegExps/Path expressions for xml, text and json
Returns:


proxy

java.lang.Object proxy(boolean active)
Enables/Disables the use of the global proxy that is configured for Jenkins. Defaults to false
Parameters:
active - true to use a proxy


status

java.lang.Object status(int statusCode)
Define the expected status code of the response. Defaults to 200. Needs to be used with check('status') to be useful.
Parameters:
statusCode - status code to expect from URL


timeout

java.lang.Object timeout(long timeout)
Defines how many seconds the trigger will wait when checking the URL. Defaults to 300 seconds.
Parameters:
timeout - number of seconds to wait for response


 

Groovy Documentation