Tabnine Logo
ProtobufTranslation.serializeResponse
Code IndexAdd Tabnine to your IDE (free)

How to use
serializeResponse
method
in
org.apache.calcite.avatica.remote.ProtobufTranslation

Best Java code snippets using org.apache.calcite.avatica.remote.ProtobufTranslation.serializeResponse (Showing top 12 results out of 315)

origin: org.apache.calcite/calcite-avatica

 @Override byte[] encode(Response response) throws IOException {
  return translation.serializeResponse(response);
 }
}
origin: org.apache.calcite.avatica/avatica-core

 @Override byte[] encode(Response response) throws IOException {
  try (final Context ctx = serializationTimer.start()) {
   return translation.serializeResponse(response);
  }
 }
}
origin: apache/calcite-avatica

 @Override byte[] encode(Response response) throws IOException {
  try (final Context ctx = serializationTimer.start()) {
   return translation.serializeResponse(response);
  }
 }
}
origin: apache/calcite-avatica

 public Response apply(Response response) throws IOException {
  // Serialize and then re-pare the response
  return translation.parseResponse(translation.serializeResponse(response));
 }
}
origin: org.apache.calcite.avatica/avatica-core

 public Response apply(Response response) throws IOException {
  // Serialize and then re-pare the response
  return translation.parseResponse(translation.serializeResponse(response));
 }
}
origin: org.apache.calcite/calcite-avatica

 public Response apply(Response response) throws IOException {
  // Serialize and then re-pare the response
  return translation.parseResponse(translation.serializeResponse(response));
 }
}
origin: org.apache.calcite.avatica/avatica-core

 @Override public Response _apply(Request request) {
  try {
   // Serialize the request to "send to the server"
   byte[] serializedRequest = translation.serializeRequest(request);

   // *some transport would normally happen here*

   // Fake deserializing that request somewhere else
   Request request2 = translation.parseRequest(serializedRequest);

   // Serialize the response from the service to "send to the client"
   byte[] serializedResponse = translation.serializeResponse(request2.accept(service));

   // *some transport would normally happen here*

   // Deserialize the response on "the client"
   return translation.parseResponse(serializedResponse);
  } catch (IOException e) {
   throw new RuntimeException(e);
  }
 }
}
origin: apache/calcite-avatica

 @Override public Response _apply(Request request) {
  try {
   // Serialize the request to "send to the server"
   byte[] serializedRequest = translation.serializeRequest(request);

   // *some transport would normally happen here*

   // Fake deserializing that request somewhere else
   Request request2 = translation.parseRequest(serializedRequest);

   // Serialize the response from the service to "send to the client"
   byte[] serializedResponse = translation.serializeResponse(request2.accept(service));

   // *some transport would normally happen here*

   // Deserialize the response on "the client"
   return translation.parseResponse(serializedResponse);
  } catch (IOException e) {
   throw new RuntimeException(e);
  }
 }
}
origin: org.apache.calcite/calcite-avatica

 @Override public Response _apply(Request request) {
  try {
   // Serialize the request to "send to the server"
   byte[] serializedRequest = translation.serializeRequest(request);

   // *some transport would normally happen here*

   // Fake deserializing that request somewhere else
   Request request2 = translation.parseRequest(serializedRequest);

   // Serialize the response from the service to "send to the client"
   byte[] serializedResponse = translation.serializeResponse(request2.accept(service));

   // *some transport would normally happen here*

   // Deserialize the response on "the client"
   return translation.parseResponse(serializedResponse);
  } catch (IOException e) {
   throw new RuntimeException(e);
  }
 }
}
origin: org.apache.calcite/calcite-avatica

when(translation.serializeResponse(response))
  .thenReturn(response.serialize().toByteArray());
origin: org.apache.calcite.avatica/avatica-core

when(translation.serializeResponse(response))
  .thenReturn(response.serialize().toByteArray());
origin: apache/calcite-avatica

when(translation.serializeResponse(response))
  .thenReturn(response.serialize().toByteArray());
org.apache.calcite.avatica.remoteProtobufTranslationserializeResponse

Javadoc

Serializes a Response as a protocol buffer.

Popular methods of ProtobufTranslation

  • parseResponse
    Parses a serialized protocol buffer response into a Response.
  • serializeRequest
    Serializes a Request as a protocol buffer.
  • parseRequest
    Parses a serialized protocol buffer request into a Request.

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Permission (java.security)
    Legacy security code; do not use.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Join (org.hibernate.mapping)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now