multiplex pull

A multiplex implementation that uses pull-stream .

License

License

GroupId

GroupId

com.zmannotes
ArtifactId

ArtifactId

multiplex-pull
Last Version

Last Version

2.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

multiplex pull
A multiplex implementation that uses pull-stream .
Project URL

Project URL

https://github.com/zman2013/multiplex-pull
Source Code Management

Source Code Management

https://github.com/zman2013/multiplex-pull

Download multiplex-pull

How to add to project

<!-- https://jarcasting.com/artifacts/com.zmannotes/multiplex-pull/ -->
<dependency>
    <groupId>com.zmannotes</groupId>
    <artifactId>multiplex-pull</artifactId>
    <version>2.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.zmannotes/multiplex-pull/
implementation 'com.zmannotes:multiplex-pull:2.1.3'
// https://jarcasting.com/artifacts/com.zmannotes/multiplex-pull/
implementation ("com.zmannotes:multiplex-pull:2.1.3")
'com.zmannotes:multiplex-pull:jar:2.1.3'
<dependency org="com.zmannotes" name="multiplex-pull" rev="2.1.3">
  <artifact name="multiplex-pull" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zmannotes', module='multiplex-pull', version='2.1.3')
)
libraryDependencies += "com.zmannotes" % "multiplex-pull" % "2.1.3"
[com.zmannotes/multiplex-pull "2.1.3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.zmannotes.stream : pull-stream jar 2.1.3

test (5)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.16
ch.qos.logback : logback-classic jar 1.2.3
junit : junit jar 4.12
org.mockito : mockito-core jar 3.1.0
com.zmannotes : netty-pull jar 0.0.2

Project Modules

There are no modules declared in this project.

multiplex-pull

combine multiple pull-streams into one share underlying stream, such as one socket-pull stream can support many duplexes.

dependency

<dependency>
    <groupId>com.zmannotes</groupId>
    <artifactId>multiplex-pull</artifactId>
    <version>2.1.3</version>
</dependency>

example

IDuplex<byte[]> duplex = new DefaultDuplex<>();

IMultiplex ma = new DefaultMultiplex()
        .onAccept(channel -> {
            link(channel.duplex(), duplex);
        });

IMultiplex mb = new DefaultMultiplex();

link(ma.duplex(), mb.duplex());

// you can create many channels based on one multiplex
IChannel channelB = mb.createChannel("food-model");
ISource<byte[]> source = new DefaultSource<>();
pull(source, channelB.duplex());

Versions

Version
2.1.3
2.1.2
1.0.2