Skip to content

An FSM that manages async non-blocking access to a Netty Channel

License

Notifications You must be signed in to change notification settings

digitalpetri/netty-channel-fsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netty Channel FSM

Maven Central

A ChannelFsm manages non-blocking access to a Netty Channel instance.

Access to the Channel happens via connect(), disconnect(), and getChannel().

Once connected, the state machine works to keep the Channel connected until disconnect() is called.

Gradle

dependencies {
    compile("com.digitalpetri.netty:netty-channel-fsm:0.8")
}

Maven

<dependencies>
    <dependency>
      <groupId>com.digitalpetri.netty</groupId>
      <artifactId>netty-channel-fsm</artifactId>
      <version>0.8</version>
    </dependency>
</dependencies>

Persistence

When the persistent setting is true, if the initial connect() fails it will move into a reconnecting state rather than back to a not connected state.

Lazyness

When the lazy settings is true, a connection loss moves the state machine into an idle state, waiting to reconnect until the next connect() or getChannel() call requests a Channel.