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 void
close()
protected byte[]
enumToByteArray(org.apache.maven.surefire.api.booter.MasterProcessCommand masterProcessCommand)
protected java.nio.charset.Charset
getCharset()
protected byte[]
getEncodedCharsetName()
protected byte[]
getEncodedMagicNumber()
protected java.nio.charset.CharsetEncoder
newCharsetEncoder()
void
sendByeAck()
void
sendNoop()
void
sendRunClass(java.lang.String testClassName)
void
sendShutdown(java.lang.String shutdownData)
void
sendSkipSinceNextTest()
void
sendTestSetFinished()
-
-
-
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:
getEncodedMagicNumber
in 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:
enumToByteArray
in classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
getEncodedCharsetName
@Nonnull protected final byte[] getEncodedCharsetName()
- Specified by:
getEncodedCharsetName
in 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:
getCharset
in 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:
newCharsetEncoder
in classorg.apache.maven.surefire.api.stream.AbstractStreamEncoder<org.apache.maven.surefire.api.booter.MasterProcessCommand>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
-