View Javadoc
1   package org.apache.maven.surefire.api.booter;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.maven.surefire.api.report.ReportEntry;
23  import org.apache.maven.surefire.api.report.StackTraceWriter;
24  
25  import java.util.Map;
26  
27  /**
28   * An abstraction for physical encoder of events.
29   *
30   * @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
31   * @since 3.0.0-M5
32   */
33  public interface MasterProcessChannelEncoder
34  {
35      MasterProcessChannelEncoder asRerunMode();
36  
37      MasterProcessChannelEncoder asNormalMode();
38  
39      boolean checkError();
40  
41      void onJvmExit();
42  
43      void sendSystemProperties( Map<String, String> sysProps );
44  
45      void testSetStarting( ReportEntry reportEntry, boolean trimStackTraces );
46  
47      void testSetCompleted( ReportEntry reportEntry, boolean trimStackTraces );
48  
49      void testStarting( ReportEntry reportEntry, boolean trimStackTraces );
50  
51      void testSucceeded( ReportEntry reportEntry, boolean trimStackTraces );
52  
53      void testFailed( ReportEntry reportEntry, boolean trimStackTraces );
54  
55      void testSkipped( ReportEntry reportEntry, boolean trimStackTraces );
56  
57      void testError( ReportEntry reportEntry, boolean trimStackTraces );
58  
59      void testAssumptionFailure( ReportEntry reportEntry, boolean trimStackTraces );
60  
61      void stdOut( String msg, boolean newLine );
62  
63      void stdErr( String msg, boolean newLine );
64  
65      void consoleInfoLog( String msg );
66  
67      void consoleErrorLog( String msg );
68  
69      void consoleErrorLog( Throwable t );
70  
71      void consoleErrorLog( String msg, Throwable t );
72  
73      void consoleErrorLog( StackTraceWriter stackTraceWriter, boolean trimStackTraces );
74  
75      void consoleDebugLog( String msg );
76  
77      void consoleWarningLog( String msg );
78  
79      void bye();
80  
81      void stopOnNextTest();
82  
83      void acquireNextTest();
84  
85      void sendExitError( StackTraceWriter stackTraceWriter, boolean trimStackTraces );
86  }