Interface Host.Service
-
- All Superinterfaces:
Maskable
,ResultLimitable
,Service
- Enclosing class:
- Host
@ApiService("SoftLayer_Network_Monitor_Version1_Query_Host") public static interface Host.Service extends Service
The Query_Host service is the core of the monitoring system. Each instance of this service represents a monitoring instance. Each monitoring instance consists of a hardware ID to monitor, an IP address attached to that hardware ID, a method of monitoring, and what to do in the instance that the monitor ever fails.
The monitoring services are scheduled jobs, and cannot be initiated by the user. Simply creating the object is enough, the monitor will begin working in 5-10 minutes. Deleting a monitor will immediately remove it from the monitoring queue. Modifications will take effect in 5-10 minutes.
If the user wishes to be notified, or have other users on the account notified when a monitoring instance fails, a response type that includes "notify users" must be included on the query host object, and a SoftLayer_User_Customer_Notification_Hardware instance must be saved linking the desired users to the hardware being monitored. In order for users to be notified, a SoftLayer_User_Customer_Notification_Hardware object MUST exist linking them to a hardware object, and a monitoring instance on that hardware object must be set to "notify users"
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Host.ServiceAsync
asAsync()
Get an async version of this serviceHost
createObject(Host templateObject)
Passing in an unsaved instances of a Query_Host object into this function will create the object and return the results to the user.List<Host>
createObjects(List<Host> templateObjects)
Passing in a collection of unsaved instances of Query_Host objects into this function will create all objects and return the results to the user.Boolean
deleteObject()
Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function.Boolean
deleteObjects(List<Host> templateObjects)
Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function.Boolean
editObject(Host templateObject)
Like any other API object, the monitoring objects can have their exposed properties edited by passing in a modified version of the object.Boolean
editObjects(List<Host> templateObjects)
Like any other API object, the monitoring objects can have their exposed properties edited by passing in a modified version of the object.List<Host>
findByHardwareId(Long hardwareId)
This method returns all Query_Host objects associated with the passed in hardware ID as long as that hardware ID is owned by the current user's account.Hardware
getHardware()
The hardware that is being monitored by this monitoring instanceResult
getLastResult()
The most recent result for this particular monitoring instance.Host
getObject()
getObject retrieves the SoftLayer_Network_Monitor_Version1_Query_Host object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Monitor_Version1_Query_Host service.Type
getQueryType()
The type of monitoring query that is executed when this hardware is monitored.ResponseType
getResponseAction()
The action taken when a monitor fails.void
setMask(Host.Mask mask)
Host.Mask
withMask()
Use the existing mask on this service or create it if not presentHost.Mask
withNewMask()
Overwrite the existing mask on this service with a new one and return it-
Methods inherited from interface com.softlayer.api.ResultLimitable
getLastResponseTotalItemCount, getResultLimit, setResultLimit
-
-
-
-
Method Detail
-
asAsync
Host.ServiceAsync asAsync()
Description copied from interface:Service
Get an async version of this service
-
withNewMask
Host.Mask withNewMask()
Description copied from interface:Maskable
Overwrite the existing mask on this service with a new one and return it- Specified by:
withNewMask
in interfaceMaskable
-
withMask
Host.Mask withMask()
Description copied from interface:Maskable
Use the existing mask on this service or create it if not present
-
setMask
void setMask(Host.Mask mask)
-
createObject
@ApiMethod Host createObject(Host templateObject)
Passing in an unsaved instances of a Query_Host object into this function will create the object and return the results to the user.
-
createObjects
@ApiMethod List<Host> createObjects(List<Host> templateObjects)
Passing in a collection of unsaved instances of Query_Host objects into this function will create all objects and return the results to the user.
-
deleteObject
@ApiMethod(instanceRequired=true) Boolean deleteObject()
Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function. The ID on the object must be set.
-
deleteObjects
@ApiMethod Boolean deleteObjects(List<Host> templateObjects)
Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function. The ID on the object must be set.
-
editObject
@ApiMethod(instanceRequired=true) Boolean editObject(Host templateObject)
Like any other API object, the monitoring objects can have their exposed properties edited by passing in a modified version of the object.
-
editObjects
@ApiMethod Boolean editObjects(List<Host> templateObjects)
Like any other API object, the monitoring objects can have their exposed properties edited by passing in a modified version of the object.
-
findByHardwareId
@ApiMethod List<Host> findByHardwareId(Long hardwareId)
This method returns all Query_Host objects associated with the passed in hardware ID as long as that hardware ID is owned by the current user's account.
This behavior can also be accomplished by simply tapping networkMonitors on the Hardware_Server object.
-
getObject
@ApiMethod(instanceRequired=true) Host getObject()
getObject retrieves the SoftLayer_Network_Monitor_Version1_Query_Host object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Monitor_Version1_Query_Host service. You can only retrieve query hosts attached to hardware that belong to your account.
-
getHardware
@ApiMethod(instanceRequired=true) Hardware getHardware()
The hardware that is being monitored by this monitoring instance
-
getLastResult
@ApiMethod(instanceRequired=true) Result getLastResult()
The most recent result for this particular monitoring instance.
-
getQueryType
@ApiMethod(instanceRequired=true) Type getQueryType()
The type of monitoring query that is executed when this hardware is monitored.
-
getResponseAction
@ApiMethod(instanceRequired=true) ResponseType getResponseAction()
The action taken when a monitor fails.
-
-