|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Accessing attributes in Java plug-in code |
« View previous topic :: View next topic » |
Author |
Message
|
dnaren |
Posted: Thu Apr 04, 2002 9:59 am Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
I am not able to understand how to access the plug-in node attributes in the evaluate method of my java plug-in code.
I wish to have a property "Reason" defined for the custom plug-in node. It will be defined while integrating this node in Control Center (using Smart Guide).
At the time of writing the code for the plug-in node, how do I access this attribute?
can I use getReason()? But What should be the definition of getReason() function in my java class?
|
|
Back to top |
|
 |
Mike Brady |
Posted: Thu Apr 04, 2002 2:00 pm Post subject: |
|
|
Newbie
Joined: 04 Jul 2001 Posts: 8
|
You just need to provide getter/setter methods.
For example,
public String getReason() {
return reason;
}
public void setReason(String reason) {
// store value in your node class for later reference
this.reason = reason;
}
However, be aware that these routines will expect an attribute called 'reason' not 'Reason' (lowercase).
|
|
Back to top |
|
 |
dnaren |
Posted: Fri Apr 05, 2002 10:29 am Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
How do I call these methods in my code? Does the framework call these methods when the plug-in node is constructed?
I have a variable _reason in my plug-in class. I defined the following functions:
Code: |
public String getReason() {
return _reason;
}
public void setReason(String reason) {
_reason = reason;
}
|
How do I access the the value of the attribute "reason" in my evaluate() method?
Quote: |
On 2002-04-04 14:00, Mike Brady wrote:
You just need to provide getter/setter methods.
For example,
public String getReason() {
return reason;
}
public void setReason(String reason) {
// store value in your node class for later reference
this.reason = reason;
}
However, be aware that these routines will expect an attribute called 'reason' not 'Reason' (lowercase).
|
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|