Codota Logo
Common$WireMessage.parseFrom
Code IndexAdd Codota to your IDE (free)

How to use
parseFrom
method
in
org.apache.calcite.avatica.proto.Common$WireMessage

Best Java code snippets using org.apache.calcite.avatica.proto.Common$WireMessage.parseFrom (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: org.apache.calcite.avatica/avatica-core

 @Override public Response parseResponse(byte[] bytes) throws IOException {
  ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes);
  CodedInputStream inputStream = byteString.newCodedInput();
  // Enable aliasing to avoid an extra copy to get at the serialized Response inside of the
  // WireMessage.
  inputStream.enableAliasing(true);
  WireMessage wireMsg = WireMessage.parseFrom(inputStream);

  String serializedMessageClassName = wireMsg.getName();
  try {
   ResponseTranslator translator = getParserForResponse(serializedMessageClassName);

   return translator.transform(wireMsg.getWrappedMessage());
  } catch (RuntimeException e) {
   if (LOG.isDebugEnabled()) {
    LOG.debug("Failed to parse response message '{}'", TextFormat.shortDebugString(wireMsg));
   }
   throw e;
  }
 }
}
origin: apache/calcite-avatica

@Override public Request parseRequest(byte[] bytes) throws IOException {
 ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes);
 CodedInputStream inputStream = byteString.newCodedInput();
 // Enable aliasing to avoid an extra copy to get at the serialized Request inside of the
 // WireMessage.
 inputStream.enableAliasing(true);
 WireMessage wireMsg = WireMessage.parseFrom(inputStream);
 String serializedMessageClassName = wireMsg.getName();
 try {
  RequestTranslator translator = getParserForRequest(serializedMessageClassName);
  // The ByteString should be logical offsets into the original byte array
  return translator.transform(wireMsg.getWrappedMessage());
 } catch (RuntimeException e) {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Failed to parse request message '{}'", TextFormat.shortDebugString(wireMsg));
  }
  throw e;
 }
}
origin: apache/calcite-avatica

 @Override public Response parseResponse(byte[] bytes) throws IOException {
  ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes);
  CodedInputStream inputStream = byteString.newCodedInput();
  // Enable aliasing to avoid an extra copy to get at the serialized Response inside of the
  // WireMessage.
  inputStream.enableAliasing(true);
  WireMessage wireMsg = WireMessage.parseFrom(inputStream);

  String serializedMessageClassName = wireMsg.getName();
  try {
   ResponseTranslator translator = getParserForResponse(serializedMessageClassName);

   return translator.transform(wireMsg.getWrappedMessage());
  } catch (RuntimeException e) {
   if (LOG.isDebugEnabled()) {
    LOG.debug("Failed to parse response message '{}'", TextFormat.shortDebugString(wireMsg));
   }
   throw e;
  }
 }
}
origin: org.apache.calcite/calcite-avatica

@Override public Request parseRequest(byte[] bytes) throws InvalidProtocolBufferException {
 WireMessage wireMsg = WireMessage.parseFrom(bytes);
 String serializedMessageClassName = wireMsg.getName();
 RequestTranslator translator = getParserForRequest(serializedMessageClassName);
 return translator.transform(wireMsg.getWrappedMessage());
}
origin: org.apache.calcite/calcite-avatica

 @Override public Response parseResponse(byte[] bytes) throws InvalidProtocolBufferException {
  WireMessage wireMsg = WireMessage.parseFrom(bytes);

  String serializedMessageClassName = wireMsg.getName();
  ResponseTranslator translator = getParserForResponse(serializedMessageClassName);

  return translator.transform(wireMsg.getWrappedMessage());
 }
}
origin: org.apache.calcite.avatica/avatica-core

@Override public Request parseRequest(byte[] bytes) throws IOException {
 ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes);
 CodedInputStream inputStream = byteString.newCodedInput();
 // Enable aliasing to avoid an extra copy to get at the serialized Request inside of the
 // WireMessage.
 inputStream.enableAliasing(true);
 WireMessage wireMsg = WireMessage.parseFrom(inputStream);
 String serializedMessageClassName = wireMsg.getName();
 try {
  RequestTranslator translator = getParserForRequest(serializedMessageClassName);
  // The ByteString should be logical offsets into the original byte array
  return translator.transform(wireMsg.getWrappedMessage());
 } catch (RuntimeException e) {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Failed to parse request message '{}'", TextFormat.shortDebugString(wireMsg));
  }
  throw e;
 }
}
org.apache.calcite.avatica.protoCommon$WireMessageparseFrom

Popular methods of Common$WireMessage

  • newBuilder
  • writeTo
  • <init>
  • getDefaultInstance
  • getName
    string name = 1;
  • getNameBytes
    optional string name = 1;
  • getWrappedMessage
    optional bytes wrapped_message = 2;
  • isInitialized
  • makeExtensionsImmutable
  • toBuilder
  • getDescriptor
  • parseUnknownFieldProto3
  • getDescriptor,
  • parseUnknownFieldProto3

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now