public final class SerializationContextImpl extends Object implements SerializationContext
Constructor and Description |
---|
SerializationContextImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canMarshall(Class clazz)
Checks if the message or enum type can be marshalled (a marshaller was defined for it).
|
boolean |
canMarshall(String descriptorFullName) |
com.google.protobuf.Descriptors.EnumDescriptor |
getEnumDescriptor(String fullName) |
<T> BaseMarshaller<T> |
getMarshaller(Class<T> clazz) |
<T> BaseMarshaller<T> |
getMarshaller(String descriptorFullName) |
com.google.protobuf.Descriptors.Descriptor |
getMessageDescriptor(String fullName) |
<T> void |
registerMarshaller(Class<? extends T> clazz,
BaseMarshaller<T> marshaller) |
void |
registerProtofile(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor) |
void |
registerProtofile(InputStream in)
The input stream is not closed when finished.
|
void |
registerProtofile(String classpathResource) |
public void registerProtofile(InputStream in) throws IOException, com.google.protobuf.Descriptors.DescriptorValidationException
SerializationContext
registerProtofile
in interface SerializationContext
IOException
com.google.protobuf.Descriptors.DescriptorValidationException
public void registerProtofile(String classpathResource) throws IOException, com.google.protobuf.Descriptors.DescriptorValidationException
registerProtofile
in interface SerializationContext
IOException
com.google.protobuf.Descriptors.DescriptorValidationException
public void registerProtofile(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor)
registerProtofile
in interface SerializationContext
public com.google.protobuf.Descriptors.Descriptor getMessageDescriptor(String fullName)
getMessageDescriptor
in interface SerializationContext
public com.google.protobuf.Descriptors.EnumDescriptor getEnumDescriptor(String fullName)
getEnumDescriptor
in interface SerializationContext
public <T> void registerMarshaller(Class<? extends T> clazz, BaseMarshaller<T> marshaller)
registerMarshaller
in interface SerializationContext
public boolean canMarshall(Class clazz)
SerializationContext
canMarshall
in interface SerializationContext
public boolean canMarshall(String descriptorFullName)
canMarshall
in interface SerializationContext
public <T> BaseMarshaller<T> getMarshaller(String descriptorFullName)
getMarshaller
in interface SerializationContext
public <T> BaseMarshaller<T> getMarshaller(Class<T> clazz)
getMarshaller
in interface SerializationContext
Copyright © 2016 JBoss, a division of Red Hat. All rights reserved.