-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from dfbarreto/add-shared-channel-init
Added SharedTCP channel initializer
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/pt/unl/fct/di/novasys/babel/initializers/SharedTCPChannelInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package pt.unl.fct.di.novasys.babel.initializers; | ||
|
||
import pt.unl.fct.di.novasys.babel.internal.BabelMessage; | ||
import pt.unl.fct.di.novasys.channel.ChannelListener; | ||
import pt.unl.fct.di.novasys.channel.tcp.SharedTCPChannel; | ||
import pt.unl.fct.di.novasys.network.ISerializer; | ||
|
||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
public class SharedTCPChannelInitializer implements ChannelInitializer<SharedTCPChannel<BabelMessage>> { | ||
|
||
@Override | ||
public SharedTCPChannel<BabelMessage> initialize(ISerializer<BabelMessage> iSerializer, ChannelListener<BabelMessage> channelListener, | ||
Properties properties, short protoId) throws IOException { | ||
return new SharedTCPChannel<>(iSerializer, channelListener, properties); | ||
} | ||
} |