From 0c95c0b689acf31482d90da182e51087129d1d9e Mon Sep 17 00:00:00 2001 From: nishantmonu51 Date: Wed, 9 Apr 2014 14:25:31 +0530 Subject: [PATCH] moved file --- .../worker/executor/ChatHandlerResource.java | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java deleted file mode 100644 index e218602aff5..00000000000 --- a/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Druid - a distributed column store. - * Copyright (C) 2012, 2013 Metamarkets Group Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package io.druid.indexing.worker.executor; - -import com.google.common.base.Optional; -import com.google.inject.Inject; -import io.druid.segment.realtime.firehose.ChatHandler; -import io.druid.segment.realtime.firehose.ChatHandlerProvider; - -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Response; - -@Path("/druid/worker/v1") -public class ChatHandlerResource -{ - private final ChatHandlerProvider handlers; - - @Inject - public ChatHandlerResource(ChatHandlerProvider handlers) - { - this.handlers = handlers; - } - - @Path("/chat/{id}") - public Object doTaskChat( - @PathParam("id") String handlerId - ) - { - final Optional handler = handlers.get(handlerId); - - if (handler.isPresent()) { - return handler.get(); - } else { - return Response.status(Response.Status.NOT_FOUND).build(); - } - } -}