org.ops4j.pax.exam
Class CompositeCustomizer

java.lang.Object
  extended by org.ops4j.pax.exam.Customizer
      extended by org.ops4j.pax.exam.CompositeCustomizer
All Implemented Interfaces:
Option

public class CompositeCustomizer
extends Customizer

Composite of Customizers. Used to treat many Customizers as a single Customizer.

Author:
Toni Menzel

Constructor Summary
CompositeCustomizer(Customizer[] customizers)
           
 
Method Summary
 void customizeEnvironment(java.io.File workingFolder)
          Callback method that can contain steps to finally change/set up the working environment.
 java.io.InputStream customizeTestProbe(java.io.InputStream testProbe)
          Callback that allow to customize the ready built test probe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeCustomizer

public CompositeCustomizer(Customizer[] customizers)
Method Detail

customizeEnvironment

public void customizeEnvironment(java.io.File workingFolder)
Description copied from class: Customizer
Callback method that can contain steps to finally change/set up the working environment. It is being called just before the OSGi platform of choice boots. An exception at this point will make exam stop and not running the test. (actually, the test will fail)

Overrides:
customizeEnvironment in class Customizer
Parameters:
workingFolder - final workingfolder (new File(".")) of your osgi setup. Be careful there, the platform may not start if you (for example) delete things in there.

customizeTestProbe

public java.io.InputStream customizeTestProbe(java.io.InputStream testProbe)
                                       throws java.lang.Exception
Description copied from class: Customizer
Callback that allow to customize the ready built test probe. Examples are: - need to obfuscate bytecode - need to add checksums - want to share/copy the probe somewhere You can use the Tinybundles library to easily change bits of your bundle on the fly.

Overrides:
customizeTestProbe in class Customizer
Parameters:
testProbe - stream of the probe
Returns:
probe to be installed instead of probe.
Throws:
java.lang.Exception - delegate exception handling to container as it would just clutter implementations.


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.