All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.greenpepper.call.ResultHandler Maven / Gradle / Ivy

The newest version!
package com.greenpepper.call;

/**
 * 

ResultHandler class.

* * @author oaouattara * @version $Id: $Id */ public class ResultHandler implements StubSyntax { private final Stub stub; private ResultMatcher matcher; /** *

Constructor for ResultHandler.

* * @param stub a {@link com.greenpepper.call.Stub} object. */ public ResultHandler( Stub stub ) { this.stub = stub; this.matcher = new AnyResult(); } /** {@inheritDoc} */ public void when( ResultMatcher matcher ) { this.matcher = matcher; } /** *

handle.

* * @param result a {@link com.greenpepper.call.Result} object. */ public void handle( Result result ) { if (matcher.matches( result )) stub.call( result ); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy