Permalink
Browse files

add OKJsonHTTPResponseHandler class

  • Loading branch information...
1 parent a7fd768 commit d593fb6df6ddfde3e2dccf0ee2326a200b0c4597 @suneets suneets committed Oct 19, 2013
Showing with 39 additions and 0 deletions.
  1. +39 −0 project/src/io/openkit/asynchttp/OKJsonHttpResponseHandler.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2012 OpenKit
+ *
+ * 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 io.openkit.asynchttp;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+public abstract class OKJsonHttpResponseHandler extends JsonHttpResponseHandler
+{
+ @Override
+ public abstract void onSuccess(JSONArray array);
+
+ @Override
+ public abstract void onSuccess(JSONObject object);
+
+ @Override
+ public abstract void onFailure(Throwable e, JSONObject errorResponse);
+
+ @Override
+ public abstract void onFailure(Throwable e, JSONArray errorResponse);
+
+ @Override
+ public abstract void onFailure(Throwable error, String content);
+
+}

0 comments on commit d593fb6

Please sign in to comment.