Package org.sblim.cimclient
Class WBEMListenerSBLIM
- java.lang.Object
-
- org.sblim.cimclient.WBEMListenerSBLIM
-
- All Implemented Interfaces:
WBEMListener
public class WBEMListenerSBLIM extends java.lang.Object implements WBEMListener
Class WBEMListenerSBLIM is the SBLIM implementation of the WBEMListener interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classWBEMListenerSBLIM.WBEMListenerImplThe real implementation of a listener that starts a HTTP server and processes incoming indications
-
Field Summary
Fields Modifier and Type Field Description protected WBEMConfigurationiConfiguration
-
Constructor Summary
Constructors Constructor Description WBEMListenerSBLIM()Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddListener(IndicationListener pListener, int pPort, java.lang.String pTransport)Add a new listener using the specified port.intaddListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr)Add a new listener using the specified port.intaddListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr, java.util.Properties pConfigurationProperties)Add a new listener using the specified port.intaddListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport)Add a new listener using the specified port.intaddListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr)Add a new listener using the specified port and local address.intaddListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr, java.util.Properties pConfigurationProperties)Add a new listener using the specified port, local address and properties.java.lang.StringgetBlockedIPs(int pPort)Get the IPs blocked by the listener associated with the specified port.java.lang.StringgetProperty(java.lang.String pName)Get a property value.voidremoveListener(int pPort)Remove the listener associated with the specified port.voidsetBlockedIPs(int pPort, java.lang.String pIPs)Set the IPs to be blocked by the listener associated with the specified port.voidsetProperty(java.lang.String pName, java.lang.String pValue)Set a property for the WBEM Listener.
-
-
-
Field Detail
-
iConfiguration
protected final WBEMConfiguration iConfiguration
-
-
Method Detail
-
addListener
public int addListener(IndicationListener pListener, int pPort, java.lang.String pTransport) throws java.io.IOException
Description copied from interface:WBEMListenerAdd a new listener using the specified port.- Specified by:
addListenerin interfaceWBEMListener- 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:
java.io.IOException- If the port is already in use.
-
addListener
public int addListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr) throws java.io.IOException
Description copied from interface:WBEMListenerAdd a new listener using the specified port.- Specified by:
addListenerin interfaceWBEMListener- 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:
java.io.IOException- If the port is already in use.
-
addListener
public int addListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr, java.util.Properties pConfigurationProperties) throws java.io.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 ofnullwill bind to all IP addresses.pConfigurationProperties- The individual configuration properties for this listener.- Returns:
- The port that was used.
- Throws:
java.io.IOException- This exception is thrown when binding to pPort fails.
-
addListener
public int addListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport) throws java.io.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:
java.io.IOException- This exception is thrown when binding to pPort fails.
-
addListener
public int addListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr) throws java.io.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 ofnullwill bind to all IP addresses.- Returns:
- The port that was used.
- Throws:
java.io.IOException- This exception is thrown when binding to pPort fails.
-
addListener
public int addListener(IndicationListenerSBLIM pListener, int pPort, java.lang.String pTransport, java.lang.String pLocalAddr, java.util.Properties pConfigurationProperties) throws java.io.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 ofnullwill bind to all IP addresses.pConfigurationProperties- The individual configuration properties for this listener.- Returns:
- The port that was used.
- Throws:
java.io.IOException- This exception is thrown when binding to pPort fails.
-
getBlockedIPs
public java.lang.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 java.lang.String getProperty(java.lang.String pName)
Description copied from interface:WBEMListenerGet a property value.- Specified by:
getPropertyin interfaceWBEMListener- Parameters:
pName- The name of the property.- Returns:
- The value of the property.
-
removeListener
public void removeListener(int pPort)
Description copied from interface:WBEMListenerRemove the listener associated with the specified port.- Specified by:
removeListenerin interfaceWBEMListener- Parameters:
pPort- The port.
-
setBlockedIPs
public void setBlockedIPs(int pPort, java.lang.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(java.lang.String pName, java.lang.String pValue)Description copied from interface:WBEMListenerSet a property for the WBEM Listener.- Specified by:
setPropertyin interfaceWBEMListener- Parameters:
pName- The name of the property.pValue- The value of the property.
-
-