javax.wbem.listener
Class WBEMListenerFactory

java.lang.Object
  extended by javax.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(String pIndicationURL, CIMInstance pIndication) {
     System.out.println(pIndication);
         }
 }
 
 String protocol = WBEMClientConstants.PROTOCOL_CIMXML;
 WBEMListener api = WBEMListenerFactory.getListener(protocol);
 int port = api.addListener(MyListener, 1234, protocol);
 


Constructor Summary
WBEMListenerFactory()
           
 
Method Summary
static WBEMListener getListener(java.lang.String pProtocol)
          Get a WBEM Listener implementation for the specified protocol.
static java.lang.String[] getProtocols()
          Get the names of the supported protocols.
static java.lang.String[] getPROTOCOLS()
          Deprecated. : Typo in method name, use getProtocols() instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBEMListenerFactory

public WBEMListenerFactory()
Method Detail

getListener

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

Parameters:
pProtocol - The protocol name.
Returns:
Implementation of WBEMListener.
Throws:
java.lang.IllegalArgumentException - Could not load protocol implementation.

getPROTOCOLS

@Deprecated
public static java.lang.String[] getPROTOCOLS()
Deprecated. : Typo in method name, use getProtocols() instead

Get the names of the supported PROTOCOLS.

Returns:
A string array of the protocol names supported.

getProtocols

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

Returns:
A string array of the protocol names supported.


Copyright © 2005, 2011 IBM Corporation. All Rights Reserved.