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

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JComboBox (javax.swing)
  • 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