org.rribbit.Response Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rribbit Show documentation
Show all versions of rribbit Show documentation
RRiBbit is an Open Source Java application framework that eliminates dependencies and simplifies code structure. It can be used as an Eventbus, but improves upon
this by being compatible with existing code and allowing bidirectional communication between components. It also supports Remoting, so that you can use Eventbuses that
run on other machines, complete with failover, loadbalancing and SSL/TLS support.
/**
* Copyright (C) 2012-2013 RRiBbit.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.rribbit;
import java.io.Serializable;
import java.util.Collection;
import org.rribbit.dispatching.RequestDispatcher;
import org.rribbit.processing.RequestProcessor;
/**
* This class represents a response to a {@link Request} that is given back by the {@link RequestProcessor} to the {@link RequestDispatcher}.
*
* The {@link Collection}s in this object should never be null, but may be empty.
*
* This class implements {@link Serializable}, but in order to be truly serializable, the user should make sure that the {@link Object}s in the returnValues are also {@link Serializable}.
*
* @param The type of the return values
*
* @author G.J. Schouten
*
*/
@SuppressWarnings("serial")
public class Response implements Serializable {
private Collection returnValues;
private Collection throwables;
public Response(Collection returnValues, Collection throwables) {
this.returnValues = returnValues;
this.throwables = throwables;
}
public Collection getReturnValues() {
return returnValues;
}
public Collection getThrowables() {
return throwables;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy