org.redmine.ta.internal.comm.FmapCommunicator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redmine-java-api-nodep Show documentation
Show all versions of redmine-java-api-nodep Show documentation
Free open-source Java API for Redmine and Chiliproject bug/task management systems.
The newest version!
package org.redmine.ta.internal.comm;
import org.apache.http.HttpRequest;
import org.redmine.ta.RedmineException;
/**
* FMap communicator.
*
* @author maxkar
*
*/
final class FmapCommunicator implements Communicator {
private final ContentHandler handler;
private final Communicator peer;
public FmapCommunicator(ContentHandler handler, Communicator peer) {
super();
this.handler = handler;
this.peer = peer;
}
@Override
public R sendRequest(HttpRequest request,
ContentHandler contentHandler) throws RedmineException {
return peer.sendRequest(request,
Communicators.compose(contentHandler, handler));
}
}