Package org.netxms.client.datacollection
Class WebServiceDefinition
java.lang.Object
org.netxms.client.datacollection.WebServiceDefinition
Web service definition
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionWebServiceDefinition
(String name) Create new definition.Create definition from NXCP message -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillMessage
(NXCPMessage msg) Fill NXCP message with object dataint
int
getFlags()
Get flags.getGuid()
Get value of given header.String[]
Get all header names.Get headers.Get HTTP request method.int
getId()
Get web service definition ID.getLogin()
getName()
int
getUrl()
boolean
Get "follow location" flag.boolean
boolean
boolean
void
removeHeader
(String name) Remove header.void
setAuthenticationType
(WebServiceAuthType authenticationType) void
setCacheRetentionTime
(int cacheRetentionTime) void
setDescription
(String description) void
setFlags
(int flags) Set flags.void
setFollowLocation
(boolean followLocation) set "follow location" flag.void
void
Set header value.void
setHttpRequestMethod
(HttpRequestMethod httpRequestMethod) Set HTTP request method.void
setId
(int id) Set web service definition ID.void
void
void
setParseAsText
(boolean useTextParsing) Sets if text parsing should be usedvoid
setPassword
(String password) void
setRequestData
(String requestData) void
setRequestTimeout
(int requestTimeout) void
void
setVerifyCertificate
(boolean verifyCertificate) void
setVerifyHost
(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
-