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

org.redmine.ta.internal.comm.FmapCommunicator Maven / Gradle / Ivy

Go to download

Free open-source Java API for Redmine and Chiliproject bug/task management systems.

There is a newer version: 1.15.0
Show 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));
	}

}