cn.chenlichao.wmi4j
类 SWbemEventSource
java.lang.Object
cn.chenlichao.wmi4j.AbstractSecurityScriptingObject
cn.chenlichao.wmi4j.SWbemEventSource
public class SWbemEventSource
- extends AbstractSecurityScriptingObject
Retrieves events from an event query in conjunction with SWbemServices.execNotificationQuery().
You get an SWbemEventSource object if you make a call to
SWbemServices.execNotificationQuery().
to make an event query.
You can then use the nextEvent(java.lang.Long) method to retrieve events as they arrive.
Created by chenlichao on 14-7-23.
|
方法摘要 |
SWbemObject |
nextEvent(Long timeoutMs)
If an event is available, the nextEvent method retrieves the event from an event query. |
nextEvent
public SWbemObject nextEvent(Long timeoutMs)
throws WMIException
- If an event is available, the nextEvent method retrieves the event from an event query.
- 参数:
timeoutMs - [Optional] Number of milliseconds the call waits for an event before returning a time-out error.
The default value for this parameter is -1, which directs the call to wait indefinitely.
- 返回:
- If successful, it returns an
SWbemObject object that contains the requested event.
If the call times out, the returned object is NULL and an error is raised.
- 抛出:
WMIException
Copyright © 2014. All rights reserved.