ovea-system

System utilities

License

License

GroupId

GroupId

com.ovea
ArtifactId

ArtifactId

ovea-system
Last Version

Last Version

1.7.ga
Release Date

Release Date

Type

Type

jar
Description

Description

ovea-system
System utilities
Project Organization

Project Organization

Ovea
Source Code Management

Source Code Management

http://github.com/Ovea/system

Download ovea-system

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
net.java.dev.jna : jna jar 3.3.0
net.java.dev.jna : jna jar 3.3.0
org.fusesource : sigar jar 1.6.4

test (3)

Group / Artifact Type Version
com.mycila : mycila-junit jar 1.2.ga
org.mockito : mockito-core jar 1.8.5
org.codehaus.groovy : groovy-all jar 1.8.1

system (1)

Group / Artifact Type Version
com.sun » tools Optional jar 1.7

Project Modules

There are no modules declared in this project.

Pipe any streams, socket, process, ...

Stream Pipes

// create a pipe
Pipe pipe = Pipes.create("optional  pipe name", myInputStream, myOutputStream).listenedBy(myOptionalPipeListener);

// get the connection handle
PipeConnection connection = pipe.connect();

// then you can do
connection.await();
connection.await(1, SECONDS);
connection.interrupt();

Process Pipes

ProcessPipe pipe = Pipes.pipe(
        new ProcessBuilder("ls", "-al", "/workspace/ovea/project/pipe/src").start(),
        new ProcessBuilder("cut", "-c", "50-").start(),
        new ProcessBuilder("grep", "-v", "-E", "\"^\\.\\.?$\"").start());
Pipes.connect("out", pipe.getInputStream(), System.out);
Pipes.connect("err", pipe.getErrorStream(), System.err);
int retCode = pipe.waitFor();

Socket Tunnels

Socket socket1 = new Socket("localhost", 2000);
Socket socket2 = new Socket("localhost", 2222);
Tunnel tunnel = Tunnel.connect(socket1, socket2, new TunnelListener() {
    @Override
    public void onConnect(Tunnel tunnel) {
        System.out.println("onConnect - " + tunnel);
    }

    @Override
    public void onClose(Tunnel tunnel) {
        System.out.println("onClose - " + tunnel);
    }

    @Override
    public void onBroken(Tunnel tunnel, BrokenTunnelException e) {
        System.out.println("onBroken - " + tunnel);
    }

    @Override
    public void onInterrupt(Tunnel tunnel) {
        System.out.println("onInterrupt - " + tunnel);
    }
});
com.ovea

OVEA

Versions

Version
1.7.ga
1.6.ga
1.5.ga
1.4.ga
1.3.ga
1.2.ga
1.1.ga
1.0.ga