@@ -0,0 +1,3550 @@
+/*******************************************************************************%0A * Copyright (C) 2017 Push Technology Ltd.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *******************************************************************************/%0A%0Apackage com.pushtechnology.diffusion.transform.messaging.send;%0A%0Aimport java.util.concurrent.CompletableFuture;%0A%0Aimport com.pushtechnology.diffusion.client.callbacks.Stream;%0Aimport com.pushtechnology.diffusion.client.session.SessionId;%0Aimport com.pushtechnology.diffusion.transform.transformer.TransformationException;%0A%0A/**%0A * A sender of values as request. May transform them before sending. May%0A * transform the response received.%0A *%0A * @param %3CT%3E the type of response understood by Diffusion%0A * @param %3CU%3E the type of request%0A * @param %3CV%3E the type of response%0A * @author Push Technology Limited%0A */%0Apublic interface RequestToSessionSender%3CT, U, V%3E %7B%0A%0A    /**%0A     * Send a request.%0A     *%0A     * @param sessionId the recipient of the request%0A     * @param path the path to send the request to%0A     * @param request the request%0A     *%0A     * @return the response%0A     */%0A    CompletableFuture%3CV%3E sendRequest(SessionId sessionId, String path, U request) throws TransformationException;%0A%0A    /**%0A     * Send a request to many sessions.%0A     *%0A     * @param sessionFilter the recipient of the request%0A     * @param path the path to send the request to%0A     * @param request the request%0A     * @param callback the callback that receives the responses%0A     *%0A     * @return the number of requests sent%0A     * @throws TransformationException if the request cannot be transformed%0A     */%0A    CompletableFuture%3CInteger%3E sendRequest(%0A        String sessionFilter,%0A        String path,%0A        U request,%0A        TransformedFilterCallback%3CT, V%3E callback) throws TransformationException;%0A%0A    /**%0A     * The callback for transformed responses.%0A     *%0A     * @param %3CR%3E the type of response understood by Diffusion%0A     * @param %3CS%3E the type of response%0A     */%0A    interface TransformedFilterCallback%3CR, S%3E extends Stream %7B%0A        /**%0A         * Called when a response has been received.%0A         *%0A         * @param sessionId sessionId of the session that sent the response%0A         * @param response transformed response object%0A         */%0A        void onResponse(SessionId sessionId, S response);%0A%0A        /**%0A         * Called when a response from a session results in an error.%0A         *%0A         * @param sessionId sessionId of the session in error%0A         * @param t the throwable reason of the response error%0A         */%0A        void onResponseError(SessionId sessionId, Throwable t);%0A%0A        /**%0A         * Called when a response has been received but cannot be transformed.%0A         *%0A         * @param sessionId sessionId of the session that sent the response%0A         * @param response untransformed response object%0A         * @param e the transformation exception%0A         */%0A        void onTransformationException(SessionId sessionId, R response, TransformationException e);%0A    %7D%0A%7D%0A

Add an interface for sending requests to sessions.