|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mfwk.discovery.MfDiscoveryResponder
Allows to implement the discovery service on the Component Product side.
When the MfDiscoveryResponder
is instantiated,
a multicast socket is created.
The MfDiscoveryResponder
then sends a discovery RESPONSE message
to the multicast group containing:
- Component Product information (Product name & instance)
- Monitoring URI
- Optional user data
This discovery RESPONSE message is also re-emitted everytime a DISCOVERY frame is received on the Multicast channel. The multicast socket default group and port can be modified setting the appropriate properties in the /etc/opt/SUNWmfwk/config/agent.properties files. The default values for the group and the port are 225.225.225.1 and 12345. These cannot be modified at run time.
NB multicast messages are only received on the local node (TTL is forced to 0)
Constructor Summary | |
MfDiscoveryResponder(java.lang.String productName,
java.lang.String productInstance,
java.lang.String uri)
Creates a new instance of MfDiscoveryResponder and starts it |
|
MfDiscoveryResponder(java.lang.String productName,
java.lang.String productInstance,
java.lang.String uri,
byte[] userData)
Creates a new instance of MfDiscoveryResponder and starts it |
|
MfDiscoveryResponder(java.lang.String productName,
java.lang.String productInstance,
java.lang.String uri,
byte[] userData,
byte[] encryptUserDataKey)
Creates a new instance of MfDiscoveryResponder and starts it A mechanism is provided for encrypting the userData part provided in the MfDiscoveryResponder. |
Method Summary | |
boolean |
getIsUserDataEncryted()
Return a boolean indicating wether encryption has been asked or not if it has then user defined data will be encrypted using the key when sent on Multicast channel |
java.lang.String |
getMulticastGroup()
Return the multicast group |
int |
getMulticastPort()
Return the multicast port |
java.lang.String |
getProductInstance()
Return the product instance unique indentifier |
java.lang.String |
getProductName()
Return the product name (includes version) |
int |
getState()
return the current state of the responder |
java.lang.String |
getUri()
Return the uri to connect to retrieve monitoring information |
byte[] |
getUserData()
Return the user defined data |
byte[] |
getUserDataKey()
Return the key used to encode user defined data |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MfDiscoveryResponder(java.lang.String productName, java.lang.String productInstance, java.lang.String uri) throws java.io.IOException
productName
- The name of the component Product to be discoveredproductInstance
- The unique identifier of the instance to be discovereduri
- The unique uri where the agent should connect to retrieve monitoring information
java.io.IOException
- if an I/O error occurspublic MfDiscoveryResponder(java.lang.String productName, java.lang.String productInstance, java.lang.String uri, byte[] userData) throws java.io.IOException
productName
- The name of the component Product to be discoveredproductInstance
- The unique identifier of the instance to be discovereduri
- The unique uri where the agent should connect to retrieve monitoring informationuserData
- The additional information that the user add to the RESP frame
Allows the user to specify additional information in the discovery RESPONSE message. The following limitation applies to the length of the byte array parameter: The length of a UDP packet is maximum 64 Kbytes.
java.io.IOException
- if an I/O error occurspublic MfDiscoveryResponder(java.lang.String productName, java.lang.String productInstance, java.lang.String uri, byte[] userData, byte[] encryptUserDataKey) throws java.io.IOException
encryptUserDataKey
- The key you provide in order to encrypt the userData field
The key you provide in the API *has to be the same* as the one contained in the /etc/opt/SUNWmfwk/security/disc.key
fileproductName
- The name of the component Product to be discoveredproductInstance
- The unique identifier of the instance to be discovereduri
- The unique uri where the agent should connect to retrieve monitoring informationuserData
- The additional information that the user add to the RESP frame
java.io.IOException
- if an I/O error occursMethod Detail |
public java.lang.String getProductName()
public java.lang.String getProductInstance()
public java.lang.String getUri()
public java.lang.String getMulticastGroup()
public int getMulticastPort()
public byte[] getUserData()
public byte[] getUserDataKey()
public boolean getIsUserDataEncryted()
public int getState()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |