Skip to content

Commit

Permalink
Add a generic Handler interface and change the RequestHandler to be a…
Browse files Browse the repository at this point in the history
… child interface of the generic one.
  • Loading branch information
Greg Orzell committed Aug 12, 2014
1 parent 7a8ace3 commit 628c6e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions rx-netty/src/main/java/io/reactivex/netty/channel/Handler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package io.reactivex.netty.channel;


import rx.Observable;

public interface Handler<IN, OUT> {

Observable<Void> handle(IN input, OUT output);

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
*/
package io.reactivex.netty.protocol.http.server;

import io.reactivex.netty.channel.Handler;
import rx.Observable;

/**
* @author Nitesh Kant
*/
public interface RequestHandler<I, O> {
public interface RequestHandler<I, O> extends Handler<HttpServerRequest<I>, HttpServerResponse<O>> {

Observable<Void> handle(HttpServerRequest<I> request, HttpServerResponse<O> response);

Expand Down

0 comments on commit 628c6e1

Please sign in to comment.