public class NRpcProtocol extends AbstractProtocol
COMPARATOR| 构造器和说明 |
|---|
NRpcProtocol(ApplicationX application) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInstance(Object instance) |
void |
addInstance(Object instance,
String requestMappingName,
Function<Method,String[]> methodToParameterNamesFunction) |
void |
addPipeline(io.netty.channel.Channel channel)
add protocol pipeline support
|
boolean |
canSupport(io.netty.buffer.ByteBuf msg)
Support protocol
|
boolean |
existInstance(Object instance) |
int |
getMessageMaxLength() |
int |
getOrder()
default Priority order 0
|
String |
getProtocolName()
Get the protocol name
|
void |
onServerStart() |
void |
onServerStop() |
void |
setMessageMaxLength(int messageMaxLength) |
toStringcanSupportconfigpublic NRpcProtocol(ApplicationX application)
public void addInstance(Object instance)
public void addInstance(Object instance, String requestMappingName, Function<Method,String[]> methodToParameterNamesFunction)
public boolean existInstance(Object instance)
public String getProtocolName()
ProtocolHandlerpublic boolean canSupport(io.netty.buffer.ByteBuf msg)
ProtocolHandlermsg - client first messagepublic void addPipeline(io.netty.channel.Channel channel)
throws Exception
ProtocolHandlerchannel - TCP channelException - Exceptionpublic int getOrder()
ProtocolHandlergetOrder 在接口中 OrderedgetOrder 在接口中 ProtocolHandlergetOrder 在接口中 ServerListenergetOrder 在类中 AbstractProtocolpublic int getMessageMaxLength()
public void setMessageMaxLength(int messageMaxLength)
Copyright © 2020. All rights reserved.