com.alipay.remoting
Interface CustomSerializer

All Known Implementing Classes:
DefaultCustomSerializer

public interface CustomSerializer

Define custom serializers for command header and content.


Method Summary
<T extends RequestCommand>
boolean
deserializeContent(T request)
          Deserialize the content of RequestCommand.
<T extends ResponseCommand>
boolean
deserializeContent(T response, InvokeContext invokeContext)
          Deserialize the content of ResponseCommand.
<T extends RequestCommand>
boolean
deserializeHeader(T request)
          Deserialize the header of RequestCommand.
<T extends ResponseCommand>
boolean
deserializeHeader(T response, InvokeContext invokeContext)
          Deserialize the header of ResponseCommand.
<T extends ResponseCommand>
boolean
serializeContent(T response)
          Serialize the content of ResponseCommand.
<T extends RequestCommand>
boolean
serializeContent(T request, InvokeContext invokeContext)
          Serialize the content of RequestCommand.
<T extends ResponseCommand>
boolean
serializeHeader(T response)
          Serialize the header of ResponseCommand.
<T extends RequestCommand>
boolean
serializeHeader(T request, InvokeContext invokeContext)
          Serialize the header of RequestCommand.
 

Method Detail

serializeHeader

<T extends RequestCommand> boolean serializeHeader(T request,
                                                   InvokeContext invokeContext)
                        throws SerializationException
Serialize the header of RequestCommand.

Parameters:
request -
invokeContext -
Returns:
Throws:
CodecException
SerializationException

serializeHeader

<T extends ResponseCommand> boolean serializeHeader(T response)
                        throws SerializationException
Serialize the header of ResponseCommand.

Parameters:
response -
Returns:
Throws:
CodecException
SerializationException

deserializeHeader

<T extends RequestCommand> boolean deserializeHeader(T request)
                          throws DeserializationException
Deserialize the header of RequestCommand.

Parameters:
request -
Returns:
Throws:
CodecException
DeserializationException

deserializeHeader

<T extends ResponseCommand> boolean deserializeHeader(T response,
                                                      InvokeContext invokeContext)
                          throws DeserializationException
Deserialize the header of ResponseCommand.

Parameters:
response -
invokeContext -
Returns:
Throws:
CodecException
DeserializationException

serializeContent

<T extends RequestCommand> boolean serializeContent(T request,
                                                    InvokeContext invokeContext)
                         throws SerializationException
Serialize the content of RequestCommand.

Parameters:
request -
invokeContext -
Returns:
Throws:
CodecException
SerializationException

serializeContent

<T extends ResponseCommand> boolean serializeContent(T response)
                         throws SerializationException
Serialize the content of ResponseCommand.

Parameters:
response -
Returns:
Throws:
CodecException
SerializationException

deserializeContent

<T extends RequestCommand> boolean deserializeContent(T request)
                           throws DeserializationException
Deserialize the content of RequestCommand.

Parameters:
request -
Returns:
Throws:
CodecException
DeserializationException

deserializeContent

<T extends ResponseCommand> boolean deserializeContent(T response,
                                                       InvokeContext invokeContext)
                           throws DeserializationException
Deserialize the content of ResponseCommand.

Parameters:
response -
invokeContext -
Returns:
Throws:
CodecException
DeserializationException


Copyright © 2018. All rights reserved.