Record Class DefaultPipelineContext
java.lang.Object
java.lang.Record
com.iohao.net.external.core.netty.micro.DefaultPipelineContext
- All Implemented Interfaces:
PipelineContext
public record DefaultPipelineContext(io.netty.channel.Channel channel, ExternalSetting setting)
extends Record
implements PipelineContext
PipelineContext is mainly used to wrap the SocketChannel channel, aiming to enhance the Handler aware capability
- Author:
- 渔民小镇
- date:
- 2023-04-26
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPipelineContext(io.netty.channel.Channel channel, ExternalSetting setting) Creates an instance of aDefaultPipelineContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the handler to the first position.voidAdds the handler to the last position.io.netty.channel.Channelchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidRemoves the specified handler.setting()Returns the value of thesettingrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface PipelineContext
addFirst, addLast
-
Constructor Details
-
DefaultPipelineContext
Creates an instance of aDefaultPipelineContextrecord class.- Parameters:
channel- the value for thechannelrecord componentsetting- the value for thesettingrecord component
-
-
Method Details
-
addFirst
Description copied from interface:PipelineContextAdds the handler to the first position.- Specified by:
addFirstin interfacePipelineContext- Parameters:
name- The name of the handlerhandler- The handler
-
addLast
Description copied from interface:PipelineContextAdds the handler to the last position.- Specified by:
addLastin interfacePipelineContext- Parameters:
name- The name of the handlerhandler- The handler
-
remove
Description copied from interface:PipelineContextRemoves the specified handler.- Specified by:
removein interfacePipelineContext- Parameters:
name- The name of the handler
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
channel
public io.netty.channel.Channel channel()Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
setting
Returns the value of thesettingrecord component.- Returns:
- the value of the
settingrecord component
-