co.cask.cdap.test.internal
Class DefaultProcedureClient
java.lang.Object
co.cask.cdap.test.internal.DefaultProcedureClient
- All Implemented Interfaces:
- ProcedureClient
public final class DefaultProcedureClient
- extends Object
- implements ProcedureClient
Simple procedure client that uses java URLConnection to fire requests.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultProcedureClient
@Inject
public DefaultProcedureClient(org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
String accountId,
String applicationId,
String procedureName)
queryRaw
public byte[] queryRaw(String method,
Map<String,String> arguments)
throws IOException
- Description copied from interface:
ProcedureClient
- Makes a query to the procedure.
- Specified by:
queryRaw in interface ProcedureClient
- Parameters:
method - Name of the procedure method to query against.arguments - Arguments to be submitted to the procedure for the query.
- Returns:
- A byte array representing the response.
- Throws:
IOException - When there is error querying the procedure.
query
public String query(String method,
Map<String,String> arguments)
throws IOException
- Description copied from interface:
ProcedureClient
- Makes a query to the procedure with
String result.
- Specified by:
query in interface ProcedureClient
- Parameters:
method - Name of the procedure method to query against.arguments - Arguments to be submitted to the procedure for the query.
- Returns:
- A
String representing the response.
- Throws:
IOException - When there is error querying the procedure.
Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.