Package org.netxms.client.datacollection
Class WebServiceDefinition
java.lang.Object
org.netxms.client.datacollection.WebServiceDefinition
Web service definition
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionWebServiceDefinition(String name) Create new definition.Create definition from NXCP message -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with object dataintintgetFlags()Get flags.getGuid()Get value of given header.String[]Get all header names.Get headers.Get HTTP request method.intgetId()Get web service definition ID.getLogin()getName()intgetUrl()booleanGet "follow location" flag.booleanbooleanbooleanvoidremoveHeader(String name) Remove header.voidsetAuthenticationType(WebServiceAuthType authenticationType) voidsetCacheRetentionTime(int cacheRetentionTime) voidsetDescription(String description) voidsetFlags(int flags) Set flags.voidsetFollowLocation(boolean followLocation) set "follow location" flag.voidvoidSet header value.voidsetHttpRequestMethod(HttpRequestMethod httpRequestMethod) Set HTTP request method.voidsetId(int id) Set web service definition ID.voidvoidvoidsetParseAsText(boolean useTextParsing) Sets if text parsing should be usedvoidsetPassword(String password) voidsetRequestData(String requestData) voidsetRequestTimeout(int requestTimeout) voidvoidsetVerifyCertificate(boolean verifyCertificate) voidsetVerifyHost(boolean verifyHost)
-
Field Details
-
VERIFY_CERTIFICATE
public static final int VERIFY_CERTIFICATE- See Also:
-
VERIFY_HOST
public static final int VERIFY_HOST- See Also:
-
PARSE_AS_TEXT
public static final int PARSE_AS_TEXT- See Also:
-
FOLLOW_LOCATION
public static final int FOLLOW_LOCATION- See Also:
-
-
Constructor Details
-
WebServiceDefinition
Create new definition. Definition object will be created with random GUID and ID 0.- Parameters:
name- name for new definition
-
WebServiceDefinition
Create definition from NXCP message- Parameters:
msg- NXCP message
-
-
Method Details
-
fillMessage
Fill NXCP message with object data- Parameters:
msg- NXCP message
-
getHeaders
Get headers. Collection returned is actual header set and any changes to it will affect web service definition object.- Returns:
- defined headers
-
getHeaderNames
Get all header names. Returned array is a copy of actual header set.- Returns:
- array containing all header names
-
getHeader
Get value of given header.- Parameters:
name- header name- Returns:
- header value or null
-
setHeader
Set header value.- Parameters:
name- header namevalue- new header value
-
removeHeader
Remove header.- Parameters:
name- header name
-
getId
public int getId()Get web service definition ID.- Returns:
- web service definition ID
-
setId
public void setId(int id) Set web service definition ID.- Parameters:
id- new web service definition ID
-
getGuid
- Returns:
- the guid
-
setGuid
- Parameters:
guid- the guid to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description- the description to set
-
getUrl
- Returns:
- the url
-
setUrl
- Parameters:
url- the url to set
-
getHttpRequestMethod
Get HTTP request method.- Returns:
- HTTP request method
-
setHttpRequestMethod
Set HTTP request method.- Parameters:
httpRequestMethod- HTTP request method
-
getRequestData
- Returns:
- the requestData
-
setRequestData
- Parameters:
requestData- the requestData to set
-
getAuthenticationType
- Returns:
- the authenticationType
-
setAuthenticationType
- Parameters:
authenticationType- the authenticationType to set
-
getLogin
- Returns:
- the login
-
setLogin
- Parameters:
login- the login to set
-
getPassword
- Returns:
- the password
-
setPassword
- Parameters:
password- the password to set
-
getCacheRetentionTime
public int getCacheRetentionTime()- Returns:
- the cacheRetentionTime
-
setCacheRetentionTime
public void setCacheRetentionTime(int cacheRetentionTime) - Parameters:
cacheRetentionTime- the cacheRetentionTime to set
-
getRequestTimeout
public int getRequestTimeout()- Returns:
- the requestTimeout
-
setRequestTimeout
public void setRequestTimeout(int requestTimeout) - Parameters:
requestTimeout- the requestTimeout to set
-
getFlags
public int getFlags()Get flags.- Returns:
- flags
-
setFlags
public void setFlags(int flags) Set flags.- Parameters:
flags- new flags
-
isVerifyCertificate
public boolean isVerifyCertificate()- Returns:
- the verifyCertificate
-
setVerifyCertificate
public void setVerifyCertificate(boolean verifyCertificate) - Parameters:
verifyCertificate- the verifyCertificate to set
-
isVerifyHost
public boolean isVerifyHost()- Returns:
- the verify host
-
setVerifyHost
public void setVerifyHost(boolean verifyHost) - Parameters:
verifyHost- the verifyHost to set
-
isFollowLocation
public boolean isFollowLocation()Get "follow location" flag.- Returns:
- "follow location" flag
-
setFollowLocation
public void setFollowLocation(boolean followLocation) set "follow location" flag.- Parameters:
followLocation- new value for "follow location" flag
-
setParseAsText
public void setParseAsText(boolean useTextParsing) Sets if text parsing should be used- Parameters:
useTextParsing- if text parsing should be used
-
isTextParsingUsed
public boolean isTextParsingUsed()- Returns:
- if text parsing should be used
-