javax.wbem.listener
Class WBEMListenerFactory

java.lang.Object
  extended byjavax.wbem.listener.WBEMListenerFactory

public class WBEMListenerFactory
extends java.lang.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

Constructor Summary
WBEMListenerFactory()
           
 
Method Summary
static WBEMListener getListener(java.lang.String protocol)
          Get a WBEM Listener implementation for the specified protocol.
static java.lang.String[] getProtocols()
          Get the names of the supported protocols.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBEMListenerFactory

public WBEMListenerFactory()
Method Detail

getListener

public static WBEMListener getListener(java.lang.String protocol)
Get a WBEM Listener implementation for the specified protocol.

Parameters:
protocol - the protocol name
Returns:
implementation of WBEMListener
Throws:
java.lang.IllegalArgumentException - could not load protocol implementation

getProtocols

public static java.lang.String[] getProtocols()
Get the names of the supported protocols.

Returns:
A string array of the protocol names supported.


Java™ WBEM (JSR48) 1.0.0 API