org.sblim.cimclient
Class WBEMListenerSBLIM

java.lang.Object
  extended by org.sblim.cimclient.WBEMListenerSBLIM
All Implemented Interfaces:
WBEMListener

public class WBEMListenerSBLIM
extends Object
implements WBEMListener

Class WBEMListenerSBLIM is the SBLIM implementation of the WBEMListener interface.


Nested Class Summary
 class WBEMListenerSBLIM.WBEMListenerImpl
          The real implementation of a listener that starts a HTTP server and processes incoming indications
 
Field Summary
protected  WBEMConfiguration iConfiguration
           
 
Constructor Summary
WBEMListenerSBLIM()
          Ctor.
 
Method Summary
 int addListener(IndicationListener pListener, int pPort, String pTransport)
          Add a new listener using the specified port.
 int addListener(IndicationListener pListener, int pPort, String pTransport, String pLocalAddr)
          Add a new listener using the specified port.
 int addListener(IndicationListener pListener, int pPort, String pTransport, String pLocalAddr, Properties pConfigurationProperties)
          Add a new listener using the specified port.
 int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport)
          Add a new listener using the specified port.
 int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, String pLocalAddr)
          Add a new listener using the specified port and local address.
 int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, String pLocalAddr, Properties pConfigurationProperties)
          Add a new listener using the specified port, local address and properties.
 String getBlockedIPs(int pPort)
          Get the IPs blocked by the listener associated with the specified port.
 String getProperty(String pName)
          Get a property value.
 void removeListener(int pPort)
          Remove the listener associated with the specified port.
 void setBlockedIPs(int pPort, String pIPs)
          Set the IPs to be blocked by the listener associated with the specified port.
 void setProperty(String pName, String pValue)
          Set a property for the WBEM Listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iConfiguration

protected final WBEMConfiguration iConfiguration
Constructor Detail

WBEMListenerSBLIM

public WBEMListenerSBLIM()
Ctor.

Method Detail

addListener

public int addListener(IndicationListener pListener,
                       int pPort,
                       String pTransport)
                throws IOException
Description copied from interface: WBEMListener
Add a new listener using the specified port.

Specified by:
addListener in interface WBEMListener
Parameters:
pListener - The Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
Returns:
The port that was used.
Throws:
IOException - If the port is already in use.

addListener

public int addListener(IndicationListener pListener,
                       int pPort,
                       String pTransport,
                       String pLocalAddr)
                throws IOException
Description copied from interface: WBEMListener
Add a new listener using the specified port.

Specified by:
addListener in interface WBEMListener
Parameters:
pListener - The Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
pLocalAddr - The local IP address to bind to. This is only needed in multi-homed systems.
Returns:
The port that was used.
Throws:
IOException - If the port is already in use.

addListener

public int addListener(IndicationListener pListener,
                       int pPort,
                       String pTransport,
                       String pLocalAddr,
                       Properties pConfigurationProperties)
                throws IOException
Add a new listener using the specified port.

Parameters:
pListener - The Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
pLocalAddr - The local IP address to bind to. This is only needed in multi-homed systems. A value of null will bind to all IP addresses.
pConfigurationProperties - The individual configuration properties for this listener.
Returns:
The port that was used.
Throws:
IOException - This exception is thrown when binding to pPort fails.

addListener

public int addListener(IndicationListenerSBLIM pListener,
                       int pPort,
                       String pTransport)
                throws IOException
Add a new listener using the specified port.

Parameters:
pListener - The SBLIM Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
Returns:
The port that was used.
Throws:
IOException - This exception is thrown when binding to pPort fails.

addListener

public int addListener(IndicationListenerSBLIM pListener,
                       int pPort,
                       String pTransport,
                       String pLocalAddr)
                throws IOException
Add a new listener using the specified port and local address.

Parameters:
pListener - The SBLIM Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
pLocalAddr - The local IP address to bind to. This is only needed in multi-homed systems. A value of null will bind to all IP addresses.
Returns:
The port that was used.
Throws:
IOException - This exception is thrown when binding to pPort fails.

addListener

public int addListener(IndicationListenerSBLIM pListener,
                       int pPort,
                       String pTransport,
                       String pLocalAddr,
                       Properties pConfigurationProperties)
                throws IOException
Add a new listener using the specified port, local address and properties.

Parameters:
pListener - The SBLIM Indication Listener that will be called when an indication is received.
pPort - The port to listen on. Use 0 to specify any available port.
pTransport - The transport to use (e.g. HTTP or HTTPS).
pLocalAddr - The local IP address to bind to. This is only needed in multi-homed systems. A value of null will bind to all IP addresses.
pConfigurationProperties - The individual configuration properties for this listener.
Returns:
The port that was used.
Throws:
IOException - This exception is thrown when binding to pPort fails.

getBlockedIPs

public String getBlockedIPs(int pPort)
Get the IPs blocked by the listener associated with the specified port.

Parameters:
pPort - The port.
Returns:
The comma-separated list of blocked IPs.

getProperty

public String getProperty(String pName)
Description copied from interface: WBEMListener
Get a property value.

Specified by:
getProperty in interface WBEMListener
Parameters:
pName - The name of the property.
Returns:
The value of the property.

removeListener

public void removeListener(int pPort)
Description copied from interface: WBEMListener
Remove the listener associated with the specified port.

Specified by:
removeListener in interface WBEMListener
Parameters:
pPort - The port.

setBlockedIPs

public void setBlockedIPs(int pPort,
                          String pIPs)
Set the IPs to be blocked by the listener associated with the specified port.

Parameters:
pPort - The port.
pIPs - The comma-separated list of blocked IPs.

setProperty

public void setProperty(String pName,
                        String pValue)
Description copied from interface: WBEMListener
Set a property for the WBEM Listener.

Specified by:
setProperty in interface WBEMListener
Parameters:
pName - The name of the property.
pValue - The value of the property.


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