javax.wbem.listener

Class WBEMListenerFactory

public class WBEMListenerFactory extends Object

The WBEMListenerFactory class is a factory for getting a WBEMListener implementation for a specific 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);
 
Constructor Summary
WBEMListenerFactory()
Ctor.
Method Summary
static WBEMListenergetListener(String protocol)
Get a WBEM Listener implementation for the specified protocol.
static String[]getPROTOCOLS()
Get the names of the supported PROTOCOLS.

Constructor Detail

WBEMListenerFactory

public WBEMListenerFactory()
Ctor.

Method Detail

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 © 2005, 2009 IBM Corporation. All Rights Reserved.