javax.wbem.listener
Class WBEMListenerFactory
java.lang.Object
javax.wbem.listener.WBEMListenerFactory
public class WBEMListenerFactory
- extends Object
This class is a factory for getting a
WBEMListener implementation for a specified protocol.
An example of how to use the factory is included below.
...
class MyListener implements IndicationListener {
public void indicationOccured(CIMInstance e) {
System.out.println(e);
}
}
String protocol = "CIM-XML";
WBEMListener api = WBEMListenerFactory.getListener(protocol);
int port = api.addListener(MyListener, 1234, protocol);
- Since:
- JSR48 1.0.0
WBEMListenerFactory
public WBEMListenerFactory()
getListener
public static WBEMListener getListener(String protocol)
- Get a WBEM Listener implementation for the specified protocol.
- Parameters:
protocol
- the protocol name
- Returns:
- implementation of WBEMListener
- Throws:
IllegalArgumentException
- could not load protocol implementation
getProtocols
public static String[] getProtocols()
- Get the names of the supported protocols.
- Returns:
- A string array of the protocol names supported.
Copyright © 2002-2008 WBEM Solutions, Inc. All Rights Reserved.