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

com.taskadapter.redmineapi.internal.comm.FmapCommunicator Maven / Gradle / Ivy

Go to download

Free open-source Java API for Redmine and Chiliproject bug/task management systems. This project was originally a part of Task Adapter application (http://www.taskadapter.com) and then was open-sourced.

The newest version!
package com.taskadapter.redmineapi.internal.comm;

import org.apache.http.HttpRequest;
import com.taskadapter.redmineapi.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));
	}

}