Package com.nettoolkit.dashboards
Class CreateChannelRequest
java.lang.Object
com.nettoolkit.internal.request.BaseApiRequest
com.nettoolkit.internal.request.PostRequest
com.nettoolkit.dashboards.CreateChannelRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisplayName(String strDisplayName) Sets the channel display name.protected HttpContentTypeprotected StringgetPath()Sets the channel name.send()Sends the request.typeDuration(String strDefaultBarColor) Sets the channel type to DURATION.typeHttp(String strHttpMethod, String strUrl, List<HttpHeader> listHttpHeaders, String strHttpBody, int iTimeNum, TimeUnit timeUnit) Sets the channel type to HTTP.Sets the channel type to PING.Sets the channel type to SIMPLE.Sets the channel type to SSL.Methods inherited from class com.nettoolkit.internal.request.PostRequest
getHttpMethod, newHttpRequestBuilder, serializeParametersMethods inherited from class com.nettoolkit.internal.request.BaseApiRequest
getClient, getParameters, toHttpRequest, toString
-
Constructor Details
-
CreateChannelRequest
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein classPostRequest
-
getPath
- Specified by:
getPathin classBaseApiRequest
-
name
Sets the channel name. required- Parameters:
strName- the channel name- Returns:
- this
-
displayName
Sets the channel display name.- Parameters:
strDisplayName- the channel name- Returns:
- this
-
typeSimple
Sets the channel type to SIMPLE.- Returns:
- this
-
typeSsl
Sets the channel type to SSL.- Parameters:
strUrl- the URL the query the SSL certificate from- Returns:
- this
- Throws:
ParsingException
-
typePing
public CreateChannelRequest typePing(String strHost, int iTimeNum, TimeUnit timeUnit) throws ParsingException Sets the channel type to PING.- Parameters:
strHost- the hostname or IP address to pingiTimeNum- time number for ping frequencytimeUnit- time unit for ping frequency- Returns:
- this
- Throws:
ParsingException
-
typeHttp
public CreateChannelRequest typeHttp(String strHttpMethod, String strUrl, List<HttpHeader> listHttpHeaders, String strHttpBody, int iTimeNum, TimeUnit timeUnit) throws ParsingException Sets the channel type to HTTP.- Parameters:
strHttpMethod- the HTTP method for requestsstrUrl- the URL to contactlistHttpHeaders- an optional list of HTTP headers to send; set to null if unnecessarystrHttpBody- optional HTTP body to send; set to null if unnecessaryiTimeNum- time number for request frequencytimeUnit- time unit for request frequency- Returns:
- this
- Throws:
ParsingException
-
typeDuration
Sets the channel type to DURATION.- Parameters:
strDefaultBarColor- the default color for duration bars in hex format- Returns:
- this
- Throws:
ParsingException
-
send
Sends the request.- Returns:
- a channel object
- Throws:
NetToolKitException
-