|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectverinec.adaptation.DistWMI
public class DistWMI
Implements the Windows Management Instrumentation (WMI) target using Jawin.
The distributer obtains a result-wmi containing the configuration data to distribute.
Here an example how the result-wmi is structured:
<result-wmi>
<wmi class="Win32_NetworkAdapterConfiguration" namespace="root/cimv2" wqlKey="Index" wqlKeyValue="1">
<method name="EnableStatic">
<param name="IPAddress" type="ArrayOfString">
<param-value value="134.21.54.85" />
</param>
<param name="SubnetMask" type="ArrayOfString">
<param-value value="255.255.255.0" />
</param>
</method>
</wmi>
</result-wmi>
The class attribute specifies the name of the wmi class you want access. The namespace
corresponds to the wmi namespace where the class is stored. The wqlKey and wqlKeyValue
atrributes define the name of the property that forms the basis of the WQL WHERE clause
and the appropriate value. Jawin an open source architecture for interoperation between Java and components
exposed through Microsoft�s Component Object Model (COM) or through Win32 Dynamic Link
Libraries (DLLs).
See jawinproject.sourceforge.net for more information about Jawin.
| Field Summary | |
|---|---|
private String |
host
|
private String |
password
|
private String |
username
|
| Constructor Summary | |
|---|---|
DistWMI()
|
|
| Method Summary | |
|---|---|
void |
distribute(Element config)
Distributes the data of the result-wmi to the system using WMI. |
String |
execute(Element command)
Execute a command of pre- or postprocess. |
void |
setTarget(Element target)
Set the target for a connection to WMI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String host
private String username
private String password
| Constructor Detail |
|---|
public DistWMI()
| Method Detail |
|---|
public void setTarget(Element target)
throws VerinecException
The host attribute is required. If the host is "." it is interpreted as the local host. The user and password attributes are optional and can only be used for a remote connection.
setTarget in interface IDistributortarget - The tr:target element of the service configuration to be distributed.
VerinecException - if the target has no wmi child or is missing required attributes.
public void distribute(Element config)
throws VerinecException
distribute in interface IDistributorconfig - A result-wmi containing the data to distribute
VerinecException - if the config is not a result-wmi or if an error occurs by writing to the WMI.
public String execute(Element command)
throws VerinecException
execute in interface IDistributorcommand - Not used.
VerinecException - Always throws exception because no command expected.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||