Package org.netxms.client.datacollection
Class WebServiceDefinition
- java.lang.Object
-
- org.netxms.client.datacollection.WebServiceDefinition
-
public class WebServiceDefinition extends Object
Web service definition
-
-
Constructor Summary
Constructors Constructor Description WebServiceDefinition(String name)Create new definition.WebServiceDefinition(org.netxms.base.NXCPMessage msg)Create definition from NXCP message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillMessage(org.netxms.base.NXCPMessage msg)Fill NXCP message with object dataWebServiceAuthTypegetAuthenticationType()intgetCacheRetentionTime()StringgetDescription()UUIDgetGuid()StringgetHeader(String name)Get value of given header.String[]getHeaderNames()Get all header names.Map<String,String>getHeaders()Get headers.intgetId()Get web service definition ID.StringgetLogin()StringgetName()StringgetPassword()intgetRequestTimeout()StringgetUrl()voidremoveHeader(String name)Remove header.voidsetAuthenticationType(WebServiceAuthType authenticationType)voidsetCacheRetentionTime(int cacheRetentionTime)voidsetDescription(String description)voidsetGuid(UUID guid)voidsetHeader(String name, String value)Set header value.voidsetId(int id)Set web service definition ID.voidsetLogin(String login)voidsetName(String name)voidsetPassword(String password)voidsetRequestTimeout(int requestTimeout)voidsetUrl(String url)
-
-
-
Constructor Detail
-
WebServiceDefinition
public WebServiceDefinition(String name)
Create new definition. Definition object will be created with random GUID and ID 0.- Parameters:
name- name for new definition
-
WebServiceDefinition
public WebServiceDefinition(org.netxms.base.NXCPMessage msg)
Create definition from NXCP message- Parameters:
msg- NXCP message
-
-
Method Detail
-
fillMessage
public void fillMessage(org.netxms.base.NXCPMessage msg)
Fill NXCP message with object data- Parameters:
msg- NXCP message
-
getHeaders
public Map<String,String> getHeaders()
Get headers. Collection returned is actual header set and any changes to it will affect web service definition object.- Returns:
- defined headers
-
getHeaderNames
public String[] getHeaderNames()
Get all header names. Returned array is a copy of actual header set.- Returns:
- array containing all header names
-
getHeader
public String getHeader(String name)
Get value of given header.- Parameters:
name- header name- Returns:
- header value or null
-
setHeader
public void setHeader(String name, String value)
Set header value.- Parameters:
name- header namevalue- new header value
-
removeHeader
public void removeHeader(String name)
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
public UUID getGuid()
- Returns:
- the guid
-
setGuid
public void setGuid(UUID guid)
- Parameters:
guid- the guid to set
-
getName
public String getName()
- Returns:
- the name
-
setName
public void setName(String name)
- Parameters:
name- the name to set
-
getDescription
public String getDescription()
- Returns:
- the description
-
setDescription
public void setDescription(String description)
- Parameters:
description- the description to set
-
getUrl
public String getUrl()
- Returns:
- the url
-
setUrl
public void setUrl(String url)
- Parameters:
url- the url to set
-
getAuthenticationType
public WebServiceAuthType getAuthenticationType()
- Returns:
- the authenticationType
-
setAuthenticationType
public void setAuthenticationType(WebServiceAuthType authenticationType)
- Parameters:
authenticationType- the authenticationType to set
-
getLogin
public String getLogin()
- Returns:
- the login
-
setLogin
public void setLogin(String login)
- Parameters:
login- the login to set
-
getPassword
public String getPassword()
- Returns:
- the password
-
setPassword
public void setPassword(String password)
- 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
-
-