com.alipay.remoting
Class DefaultCustomSerializer

java.lang.Object
  extended by com.alipay.remoting.DefaultCustomSerializer
All Implemented Interfaces:
CustomSerializer

public class DefaultCustomSerializer
extends Object
implements CustomSerializer

The default custom serializer, which does nothing. Extend this class and override the methods you want to custom.


Constructor Summary
DefaultCustomSerializer()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCustomSerializer

public DefaultCustomSerializer()
Method Detail

serializeHeader

public <T extends RequestCommand> boolean serializeHeader(T request,
                                                          InvokeContext invokeContext)
                        throws SerializationException
Description copied from interface: CustomSerializer
Serialize the header of RequestCommand.

Specified by:
serializeHeader in interface CustomSerializer
Returns:
Throws:
SerializationException
See Also:
CustomSerializer.serializeHeader(com.alipay.remoting.rpc.RequestCommand, InvokeContext)

serializeHeader

public <T extends ResponseCommand> boolean serializeHeader(T response)
                        throws SerializationException
Description copied from interface: CustomSerializer
Serialize the header of ResponseCommand.

Specified by:
serializeHeader in interface CustomSerializer
Returns:
Throws:
SerializationException
See Also:
CustomSerializer.serializeHeader(com.alipay.remoting.rpc.ResponseCommand)

deserializeHeader

public <T extends RequestCommand> boolean deserializeHeader(T request)
                          throws DeserializationException
Description copied from interface: CustomSerializer
Deserialize the header of RequestCommand.

Specified by:
deserializeHeader in interface CustomSerializer
Returns:
Throws:
DeserializationException
See Also:
CustomSerializer.deserializeHeader(com.alipay.remoting.rpc.RequestCommand)

deserializeHeader

public <T extends ResponseCommand> boolean deserializeHeader(T response,
                                                             InvokeContext invokeContext)
                          throws DeserializationException
Description copied from interface: CustomSerializer
Deserialize the header of ResponseCommand.

Specified by:
deserializeHeader in interface CustomSerializer
Returns:
Throws:
DeserializationException
See Also:
CustomSerializer.deserializeHeader(com.alipay.remoting.rpc.ResponseCommand, InvokeContext)

serializeContent

public <T extends RequestCommand> boolean serializeContent(T request,
                                                           InvokeContext invokeContext)
                         throws SerializationException
Description copied from interface: CustomSerializer
Serialize the content of RequestCommand.

Specified by:
serializeContent in interface CustomSerializer
Returns:
Throws:
SerializationException
See Also:
CustomSerializer.serializeContent(com.alipay.remoting.rpc.RequestCommand, InvokeContext)

serializeContent

public <T extends ResponseCommand> boolean serializeContent(T response)
                         throws SerializationException
Description copied from interface: CustomSerializer
Serialize the content of ResponseCommand.

Specified by:
serializeContent in interface CustomSerializer
Returns:
Throws:
SerializationException
See Also:
CustomSerializer.serializeContent(com.alipay.remoting.rpc.ResponseCommand)

deserializeContent

public <T extends RequestCommand> boolean deserializeContent(T request)
                           throws DeserializationException
Description copied from interface: CustomSerializer
Deserialize the content of RequestCommand.

Specified by:
deserializeContent in interface CustomSerializer
Returns:
Throws:
DeserializationException
See Also:
CustomSerializer.deserializeContent(com.alipay.remoting.rpc.RequestCommand)

deserializeContent

public <T extends ResponseCommand> boolean deserializeContent(T response,
                                                              InvokeContext invokeContext)
                           throws DeserializationException
Description copied from interface: CustomSerializer
Deserialize the content of ResponseCommand.

Specified by:
deserializeContent in interface CustomSerializer
Returns:
Throws:
DeserializationException
See Also:
CustomSerializer.deserializeContent(com.alipay.remoting.rpc.ResponseCommand, InvokeContext)


Copyright © 2018. All rights reserved.