Skip to content

Commit

Permalink
Merge pull request #204 from gorzell/HandlerInterface
Browse files Browse the repository at this point in the history
Add a generic Handler interface
  • Loading branch information
NiteshKant committed Aug 13, 2014
2 parents 7a8ace3 + 628c6e1 commit cafeb0d
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 cafeb0d

Please sign in to comment.