/* * Copyright (c) 2016, Huawei Technologies Co., Ltd. * * 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.openo.baseservice.roa.util.restclient; import org.openo.baseservice.remoteservice.exception.ServiceException; /** * ReSTful method interface.
*

*

* * @author * @version SDNO 0.5 28-May-2016 */ public interface Restful { /** * Http GET method.
* * @param servicePath: request path. * @param restParametes: query parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse get(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http HEAD method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse head(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Http HEAD method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse head(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http GET method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse get(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Asynchronouse GET request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncGet(String servicePath, RestfulParametes restParametes, RestfulAsyncCallback callback) throws ServiceException; /** * Asynchronouse GET request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncGet(String servicePath, RestfulParametes restParametes, RestfulOptions options, RestfulAsyncCallback callback) throws ServiceException; /** * Http PUT method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse put(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http PUT method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse put(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Asynchronouse PUT request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPut(String servicePath, RestfulParametes restParametes, RestfulAsyncCallback callback) throws ServiceException; /** * Asynchronouse PUT request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPut(String servicePath, RestfulParametes restParametes, RestfulOptions options, RestfulAsyncCallback callback) throws ServiceException; /** * Http POST method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse post(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http POST method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse post(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Asynchronouse POST request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPost(String servicePath, RestfulParametes restParametes, RestfulAsyncCallback callback) throws ServiceException; /** * Asynchronouse POST request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPost(String servicePath, RestfulParametes restParametes, RestfulOptions options, RestfulAsyncCallback callback) throws ServiceException; /** * Http DELETE method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse delete(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http DELETE method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse delete(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Asynchronouse DELETE request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncDelete(String servicePath, RestfulParametes restParametes, RestfulAsyncCallback callback) throws ServiceException; /** * Asynchronouse DELETE request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncDelete(String servicePath, RestfulParametes restParametes, RestfulOptions options, RestfulAsyncCallback callback) throws ServiceException; /** * Http PATCH method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse patch(String servicePath, RestfulParametes restParametes) throws ServiceException; /** * Http PATCH method.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @return response. * @throws ServiceException * @since SDNO 0.5 */ RestfulResponse patch(String servicePath, RestfulParametes restParametes, RestfulOptions options) throws ServiceException; /** * Asynchronouse PATCH request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPatch(String servicePath, RestfulParametes restParametes, RestfulAsyncCallback callback) throws ServiceException; /** * Asynchronouse PATCH request.
* * @param servicePath: request path. * @param restParametes: request parameters. * @param options: request options. * @param callback: response callback method. * @throws ServiceException * @since SDNO 0.5 */ void asyncPatch(String servicePath, RestfulParametes restParametes, RestfulOptions options, RestfulAsyncCallback callback) throws ServiceException; }