org.jboss.verifier
Class BeanVerifier

java.lang.Object
  extended by org.jboss.verifier.BeanVerifier
All Implemented Interfaces:
org.gjt.lindfors.pattern.StrategyContext, org.gjt.lindfors.util.EventGenerator, VerificationEventGenerator, VerificationContext

public class BeanVerifier
extends Object
implements VerificationContext

Attempts to verify the spec compliance of the beans in a given EJB-JAR file. Works against EJB spec 1.1 and 2.0. Built for use in JBoss project.

Since:
JDK 1.3
Version:
$Revision: 57209 $
Author:
Juha Lindfors, Thomas.Diesler@jboss.org
See Also:
VerificationStrategy, VerificationEventFactory

Field Summary
 
Fields inherited from interface org.jboss.verifier.strategy.VerificationContext
VERSION_1_1, VERSION_2_0, VERSION_2_1
 
Constructor Summary
BeanVerifier()
          Default constructor.
 
Method Summary
 void addVerificationListener(VerificationListener listener)
           
 void fireBeanChecked(VerificationEvent event)
           
 void fireSpecViolation(VerificationEvent event)
           
 ApplicationMetaData getApplicationMetaData()
           
 ClassLoader getClassLoader()
           
 String getEJBVersion()
           
 URL getJarLocation()
           
 boolean getSuccess()
          Check if the Verifier was successful
protected  VerificationStrategy getVerifier()
           
 void removeVerificationListener(VerificationListener listener)
           
protected  void setVerifier(String version)
           
 void verify(URL url, ApplicationMetaData metaData)
          Checks the Enterprise Java Beans found in this Jar for EJB spec compliance (EJB Spec.
 void verify(URL url, ApplicationMetaData metaData, ClassLoader cl)
          Checks the Enterprise Java Beans found in this Jar for EJB spec compliance (EJB Spec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanVerifier

public BeanVerifier()
Default constructor.

Method Detail

verify

public void verify(URL url,
                   ApplicationMetaData metaData)
Checks the Enterprise Java Beans found in this Jar for EJB spec compliance (EJB Spec. 1.1). Ensures that the given interfaces and implementation classes implement required methods and follow the contract given in the spec.

Parameters:
url - URL to the bean jar file

verify

public void verify(URL url,
                   ApplicationMetaData metaData,
                   ClassLoader cl)
Checks the Enterprise Java Beans found in this Jar for EJB spec compliance (EJB Spec. 1.1). Ensures that the given interfaces and implementation classes implement required methods and follow the contract given in the spec.

Parameters:
url - URL to the bean jar file
cl - The ClassLoader to use

getSuccess

public boolean getSuccess()
Check if the Verifier was successful

Returns:
true if all Beans have been verified, false otherwise.

addVerificationListener

public void addVerificationListener(VerificationListener listener)
Specified by:
addVerificationListener in interface VerificationEventGenerator

removeVerificationListener

public void removeVerificationListener(VerificationListener listener)
Specified by:
removeVerificationListener in interface VerificationEventGenerator

fireBeanChecked

public void fireBeanChecked(VerificationEvent event)
Specified by:
fireBeanChecked in interface VerificationEventGenerator

fireSpecViolation

public void fireSpecViolation(VerificationEvent event)
Specified by:
fireSpecViolation in interface VerificationEventGenerator

getApplicationMetaData

public ApplicationMetaData getApplicationMetaData()
Specified by:
getApplicationMetaData in interface VerificationContext

getJarLocation

public URL getJarLocation()
Specified by:
getJarLocation in interface VerificationContext

getClassLoader

public ClassLoader getClassLoader()
Specified by:
getClassLoader in interface VerificationContext

getEJBVersion

public String getEJBVersion()
Specified by:
getEJBVersion in interface VerificationContext

setVerifier

protected void setVerifier(String version)

getVerifier

protected VerificationStrategy getVerifier()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.