Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* (C) Copyright 2013 Kurento (http://kurento.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.kurento.jsonrpc.internal;
import static org.kurento.jsonrpc.JsonUtils.INJECT_SESSION_ID;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import org.kurento.jsonrpc.JsonRpcErrorException;
import org.kurento.jsonrpc.client.Continuation;
import org.kurento.jsonrpc.message.Request;
import org.kurento.jsonrpc.message.Response;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
public abstract class JsonRpcRequestSenderHelper implements JsonRpcRequestSender {
protected AtomicInteger id = new AtomicInteger();
protected String sessionId;
public JsonRpcRequestSenderHelper() {
}
public JsonRpcRequestSenderHelper(String sessionId) {
this.sessionId = sessionId;
}
public String getSessionId() {
return sessionId;
}
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
@Override
public R sendRequest(String method, Class resultClass) throws IOException {
return sendRequest(method, null, resultClass);
}
@Override
public R sendRequest(String method, Object params, Class resultClass) throws IOException {
Request