Package org.apache.maven.surefire.stream
Class CommandEncoder
- java.lang.Object
-
- org.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
- org.apache.maven.surefire.stream.CommandEncoder
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class CommandEncoder extends org.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand> implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description CommandEncoder(java.nio.channels.WritableByteChannel out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected byte[]enumToByteArray(org.apache.maven.surefire.api.booter.MasterProcessCommand masterProcessCommand)protected java.nio.charset.CharsetgetCharset()protected byte[]getEncodedCharsetName()protected byte[]getEncodedMagicNumber()protected java.nio.charset.CharsetEncodernewCharsetEncoder()voidsendByeAck()voidsendNoop()voidsendRunClass(java.lang.String testClassName)voidsendShutdown(java.lang.String shutdownData)voidsendSkipSinceNextTest()voidsendTestSetFinished()
-
-
-
Method Detail
-
sendRunClass
public void sendRunClass(java.lang.String testClassName) throws java.io.IOException- Throws:
java.io.IOException
-
sendTestSetFinished
public void sendTestSetFinished() throws java.io.IOException- Throws:
java.io.IOException
-
sendSkipSinceNextTest
public void sendSkipSinceNextTest() throws java.io.IOException- Throws:
java.io.IOException
-
sendShutdown
public void sendShutdown(java.lang.String shutdownData) throws java.io.IOException- Throws:
java.io.IOException
-
sendNoop
public void sendNoop() throws java.io.IOException- Throws:
java.io.IOException
-
sendByeAck
public void sendByeAck() throws java.io.IOException- Throws:
java.io.IOException
-
getEncodedMagicNumber
@Nonnull protected final byte[] getEncodedMagicNumber()
- Specified by:
getEncodedMagicNumberin classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
enumToByteArray
@Nonnull protected final byte[] enumToByteArray(org.apache.maven.surefire.api.booter.MasterProcessCommand masterProcessCommand)
- Specified by:
enumToByteArrayin classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
getEncodedCharsetName
@Nonnull protected final byte[] getEncodedCharsetName()
- Specified by:
getEncodedCharsetNamein classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
getCharset
@Nonnull protected final java.nio.charset.Charset getCharset()
- Specified by:
getCharsetin classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
newCharsetEncoder
@Nonnull protected final java.nio.charset.CharsetEncoder newCharsetEncoder()
- Specified by:
newCharsetEncoderin classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
-