Package javax.wbem.listener
Interface WBEMListener
-
- All Known Implementing Classes:
WBEMListenerSBLIM
public interface WBEMListener
TheWBEMListener
interface is used to add/remove WBEM Indication Listeners. The implementation of aWBEMListener
can be retrieved from theWBEMListenerFactor
by specifying the protocol to use to listen for indications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addListener(IndicationListener pListener, int pPort, java.lang.String pTransport)
Add a new listener using the specified port.int
addListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String localAddr)
Add a new listener using the specified port.java.lang.String
getProperty(java.lang.String pName)
Get a property value.void
removeListener(int pPort)
Remove the listener associated with the specified port.void
setProperty(java.lang.String pName, java.lang.String pValue)
Set a property for the WBEM Listener.
-
-
-
Method Detail
-
addListener
int addListener(IndicationListener pListener, int pPort, java.lang.String pTransport) 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).- Returns:
- The port that was used.
- Throws:
java.io.IOException
- If the port is already in use.
-
addListener
int addListener(IndicationListener pListener, int pPort, java.lang.String pTransport, java.lang.String localAddr) 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).localAddr
- 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.
-
getProperty
java.lang.String getProperty(java.lang.String pName)
Get a property value.- Parameters:
pName
- The name of the property.- Returns:
- The value of the property.
-
removeListener
void removeListener(int pPort)
Remove the listener associated with the specified port.- Parameters:
pPort
- The port.
-
setProperty
void setProperty(java.lang.String pName, java.lang.String pValue)
Set a property for the WBEM Listener.- Parameters:
pName
- The name of the property.pValue
- The value of the property.- Throws:
java.lang.IllegalArgumentException
- If the name is not a supported property name.
-
-