User: juha
Date: 00/08/20 13:48:09
Modified: src/main/org/jboss/verifier/event VerificationListener.java
VerificationEventGeneratorSupport.java
VerificationEventGenerator.java
VerificationEvent.java
Log:
Changes to the listener interface.
Revision Changes Path
1.2 +3 -2
jboss/src/main/org/jboss/verifier/event/VerificationListener.java
Index: VerificationListener.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VerificationListener.java 2000/05/29 18:26:31 1.1
+++ VerificationListener.java 2000/08/20 20:48:08 1.2
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This package and its source code is available at www.gjt.org
- * $Id: VerificationListener.java,v 1.1 2000/05/29 18:26:31 juha Exp $
+ * $Id: VerificationListener.java,v 1.2 2000/08/20 20:48:08 juha Exp $
*
* You can reach the author by sending email to [EMAIL PROTECTED] or
* directly to [EMAIL PROTECTED]
@@ -42,12 +42,13 @@
* @see << OTHER RELATED CLASSES >>
*
* @author Juha Lindfors
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @since JDK 1.3
*/
public interface VerificationListener extends EventListener {
public void beanChecked(VerificationEvent event);
+ public void specViolation(VerificationEvent event);
}
1.2 +13 -6
jboss/src/main/org/jboss/verifier/event/VerificationEventGeneratorSupport.java
Index: VerificationEventGeneratorSupport.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationEventGeneratorSupport.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VerificationEventGeneratorSupport.java 2000/05/29 18:26:31 1.1
+++ VerificationEventGeneratorSupport.java 2000/08/20 20:48:08 1.2
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * This package and its source code is available at www.gjt.org
- * $Id: VerificationEventGeneratorSupport.java,v 1.1 2000/05/29 18:26:31 juha Exp $
+ * This package and its source code is available at www.jboss.org
+ * $Id: VerificationEventGeneratorSupport.java,v 1.2 2000/08/20 20:48:08 juha Exp $
*
- * You can reach the author by sending email to [EMAIL PROTECTED] or
- * directly to [EMAIL PROTECTED]
+ * You can reach the author by sending email to [EMAIL PROTECTED]
*/
@@ -44,7 +43,7 @@
* @see << OTHER RELATED CLASSES >>
*
* @author Juha Lindfors
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @since JDK 1.3
*/
public class VerificationEventGeneratorSupport extends EventGeneratorSupport {
@@ -86,7 +85,15 @@
}
}
-
+ public void fireSpecViolation(VerificationEvent event) {
+
+ Enumeration e = super.getListeners();
+
+ while (e.hasMoreElements()) {
+ VerificationListener listener = (VerificationListener) e.nextElement();
+ listener.specViolation(event);
+ }
+ }
}
1.2 +5 -7
jboss/src/main/org/jboss/verifier/event/VerificationEventGenerator.java
Index: VerificationEventGenerator.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationEventGenerator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VerificationEventGenerator.java 2000/05/29 18:26:31 1.1
+++ VerificationEventGenerator.java 2000/08/20 20:48:08 1.2
@@ -18,17 +18,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * This package and its source code is available at www.gjt.org
- * $Id: VerificationEventGenerator.java,v 1.1 2000/05/29 18:26:31 juha Exp $
+ * This package and its source code is available at www.jboss.org
+ * $Id: VerificationEventGenerator.java,v 1.2 2000/08/20 20:48:08 juha Exp $
*
- * You can reach the author by sending email to [EMAIL PROTECTED] or
- * directly to [EMAIL PROTECTED]
+ * You can reach the author by sending email to [EMAIL PROTECTED]
*/
-// standard imports
-
// non-standard class dependencies
import org.gjt.lindfors.util.EventGenerator;
@@ -42,7 +39,7 @@
* @see << OTHER RELATED CLASSES >>
*
* @author Juha Lindfors
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @since JDK 1.3
*/
public interface VerificationEventGenerator extends EventGenerator {
@@ -51,6 +48,7 @@
abstract void removeVerificationListener(VerificationListener listener);
abstract void fireBeanChecked(VerificationEvent event);
+ abstract void fireSpecViolation(VerificationEvent event);
}
1.3 +24 -4 jboss/src/main/org/jboss/verifier/event/VerificationEvent.java
Index: VerificationEvent.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationEvent.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VerificationEvent.java 2000/06/07 00:02:52 1.2
+++ VerificationEvent.java 2000/08/20 20:48:08 1.3
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This package and its source code is available at www.gjt.org
- * $Id: VerificationEvent.java,v 1.2 2000/06/07 00:02:52 mulder Exp $
+ * $Id: VerificationEvent.java,v 1.3 2000/08/20 20:48:08 juha Exp $
*
* You can reach the author by sending email to [EMAIL PROTECTED] or
* directly to [EMAIL PROTECTED]
@@ -42,7 +42,7 @@
* @see << OTHER RELATED CLASSES >>
*
* @author Juha Lindfors
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @since JDK 1.3
*/
public class VerificationEvent extends EventObject {
@@ -57,13 +57,24 @@
/*
* Contains a short, one line message for this event.
*/
- private String message = "<undefined>";
+ private String message = "<undefined>";
/*
* Contains a more verbose description of this event.
*/
- private String verbose = "";
+ private String verbose = "";
+ private String beanName = "<unnamed>";
+
+
+/*
+ *************************************************************************
+ *
+ * PUBLIC INSTANCE METHODS
+ *
+ *************************************************************************
+ */
+
/*
* Constructor
@@ -109,6 +120,10 @@
this.verbose = msg;
}
+ public void setName(String name) {
+ this.beanName = name;
+ }
+
public String getMessage() {
return message;
}
@@ -117,6 +132,11 @@
return verbose;
}
+ public String getName() {
+ return beanName;
+ }
+
+
/*
* String constants
*/