org.jboss.verifier
Class BeanVerifier

java.lang.Object
  extended byorg.jboss.verifier.BeanVerifier
All Implemented Interfaces:
VerificationContext (src) , VerificationEventGenerator (src)

public class BeanVerifier
extends java.lang.Object
implements VerificationContext (src)

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
See Also:
VerificationStrategy (src) , VerificationEventFactory (src)

Field Summary
 
Fields inherited from interface org.jboss.verifier.strategy.VerificationContext (src)
VERSION_1_1, VERSION_2_0, VERSION_2_1
 
Constructor Summary
BeanVerifier()
          Default constructor.
 
Method Summary
 void addVerificationListener(VerificationListener (src)  listener)
           
 void fireBeanChecked(VerificationEvent (src)  event)
           
 void fireSpecViolation(VerificationEvent (src)  event)
           
 ApplicationMetaData (src) getApplicationMetaData()
           
 java.lang.ClassLoader getClassLoader()
           
 java.lang.String getEJBVersion()
           
 java.net.URL getJarLocation()
           
 boolean getSuccess()
          Check if the Verifier was successful
protected  VerificationStrategy (src) getVerifier()
           
 void removeVerificationListener(VerificationListener (src)  listener)
           
protected  void setVerifier(java.lang.String version)
           
 void verify(java.net.URL url, ApplicationMetaData (src)  metaData)
          Checks the Enterprise Java Beans found in this Jar for EJB spec compliance (EJB Spec.
 void verify(java.net.URL url, ApplicationMetaData (src)  metaData, java.lang.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(java.net.URL url,
                   ApplicationMetaData (src)  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(java.net.URL url,
                   ApplicationMetaData (src)  metaData,
                   java.lang.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 (src)  listener)
Specified by:
addVerificationListener in interface VerificationEventGenerator (src)

removeVerificationListener

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

fireBeanChecked

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

fireSpecViolation

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

getApplicationMetaData

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

getJarLocation

public java.net.URL getJarLocation()
Specified by:
getJarLocation in interface VerificationContext (src)

getClassLoader

public java.lang.ClassLoader getClassLoader()
Specified by:
getClassLoader in interface VerificationContext (src)

getEJBVersion

public java.lang.String getEJBVersion()
Specified by:
getEJBVersion in interface VerificationContext (src)

setVerifier

protected void setVerifier(java.lang.String version)

getVerifier

protected VerificationStrategy (src)  getVerifier()