Search in sources :

Example 21 with Pipe

use of java.nio.channels.Pipe in project robovm by robovm.

the class SSLEngineTest method prepareEngines.

void prepareEngines() throws IOException {
    Pipe clientSendPipe = Pipe.open();
    Pipe serverSendPipe = Pipe.open();
    SinkChannel clientSink = clientSendPipe.sink();
    SourceChannel serverSource = clientSendPipe.source();
    SinkChannel serverSink = serverSendPipe.sink();
    SourceChannel clientSource = serverSendPipe.source();
    clientEngine = new HandshakeHandler(true, clientSource, clientSink);
    serverEngine = new HandshakeHandler(false, serverSource, serverSink);
}
Also used : SourceChannel(java.nio.channels.Pipe.SourceChannel) Pipe(java.nio.channels.Pipe) SinkChannel(java.nio.channels.Pipe.SinkChannel)

Aggregations

Pipe (java.nio.channels.Pipe)21 Test (org.junit.Test)7 File (java.io.File)6 GcsPath (org.apache.beam.sdk.util.gcsfs.GcsPath)6 FileNotFoundException (java.io.FileNotFoundException)5 DataflowPackage (com.google.api.services.dataflow.model.DataflowPackage)3 DbusEventAppender (com.linkedin.databus.core.test.DbusEventAppender)3 DbusEventBufferReader (com.linkedin.databus.core.test.DbusEventBufferReader)3 DbusEventGenerator (com.linkedin.databus.core.test.DbusEventGenerator)3 UncaughtExceptionTrackingThread (com.linkedin.databus.core.util.UncaughtExceptionTrackingThread)3 ArrayList (java.util.ArrayList)3 Vector (java.util.Vector)3 Matchers.anyString (org.mockito.Matchers.anyString)3 DatabusV2ConsumerRegistration (com.linkedin.databus.client.consumer.DatabusV2ConsumerRegistration)2 MultiConsumerCallback (com.linkedin.databus.client.consumer.MultiConsumerCallback)2 SelectingDatabusCombinedConsumer (com.linkedin.databus.client.consumer.SelectingDatabusCombinedConsumer)2 StreamConsumerCallbackFactory (com.linkedin.databus.client.consumer.StreamConsumerCallbackFactory)2 ConsumerCallbackStats (com.linkedin.databus.client.pub.mbean.ConsumerCallbackStats)2 UnifiedClientStats (com.linkedin.databus.client.pub.mbean.UnifiedClientStats)2 Checkpoint (com.linkedin.databus.core.Checkpoint)2