Class WBEMListenerSBLIM
java.lang.Object
org.sblim.cimclient.WBEMListenerSBLIM
- All Implemented Interfaces:
WBEMListener
Class WBEMListenerSBLIM is the SBLIM implementation of the WBEMListener
interface.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
The real implementation of a listener that starts a HTTP server and processes incoming indications -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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.getBlockedIPs
(int pPort) Get the IPs blocked by the listener associated with the specified port.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.
-
Field Details
-
iConfiguration
-
-
Constructor Details
-
WBEMListenerSBLIM
public WBEMListenerSBLIM()Ctor.
-
-
Method Details
-
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 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:
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 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:
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 ofnull
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 ofnull
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 ofnull
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
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
Description copied from interface:WBEMListener
Get a property value.- Specified by:
getProperty
in interfaceWBEMListener
- 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 interfaceWBEMListener
- Parameters:
pPort
- The port.
-
setBlockedIPs
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
Description copied from interface:WBEMListener
Set a property for the WBEM Listener.- Specified by:
setProperty
in interfaceWBEMListener
- Parameters:
pName
- The name of the property.pValue
- The value of the property.
-