Home | History | Annotate | Download | only in framework
      1 /*
      2  * Licensed to the Apache Software Foundation (ASF) under one or more
      3  * contributor license agreements.  See the NOTICE file distributed with
      4  * this work for additional information regarding copyright ownership.
      5  * The ASF licenses this file to You under the Apache License, Version 2.0
      6  * (the "License"); you may not use this file except in compliance with
      7  * the License.  You may obtain a copy of the License at
      8  *
      9  *     http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *
     15  *  See the License for the specific language governing permissions and
     16  *  limitations under the License.
     17  */
     18 
     19 /**
     20  * @author Vitaly A. Provodin
     21  */
     22 
     23 /**
     24  * Created on 26.01.2005
     25  */
     26 package org.apache.harmony.jpda.tests.framework;
     27 
     28 /**
     29  * This class represents debuggee VM on debugger side.
     30  * <p>
     31  * This abstract class defines a set of commands to control debuggee VM.
     32  * To provide the safely start up and shoot down of debuggee, an instance of
     33  * <code>DebuggeeWrapper</code> should be registered in <code>DebuggeeRegister</code>.
     34  *
     35  * @see DebuggeeRegister
     36  */
     37 public abstract class DebuggeeWrapper {
     38 
     39     protected TestOptions settings;
     40     protected LogWriter logWriter;
     41 
     42     /**
     43      * Creates an instance of <code>DebuggeeWrapper</code>.
     44      *
     45      * @param settings specifies parameters for debuggee start
     46      * @param logWriter provides unified facilities for logging
     47      */
     48     public DebuggeeWrapper(TestOptions settings, LogWriter logWriter) {
     49         super();
     50         this.settings = settings;
     51         this.logWriter = logWriter;
     52     }
     53 
     54     /**
     55      * An implementation of this method must initiate the debuggee to start.
     56      */
     57     public abstract void start();
     58 
     59     /**
     60      * An implementation of this method must cause the debuggee to stop.
     61      */
     62     public abstract void stop();
     63 
     64     /**
     65      * An implementation of this method must cause the debuggee to exit
     66      * with specified <code>exitStatus</code> .
     67      *
     68      * @param exitStatus
     69      */
     70     public abstract void exit(int exitStatus);
     71 
     72     /**
     73      * An implementation of this method must cause the debuggee to resume.
     74      */
     75     public abstract void resume();
     76 
     77     /**
     78      * An implementation of this method must cause the debuggee to dispose.
     79      */
     80     public abstract void dispose();
     81 
     82     /**
     83      * Return associated logWriter object.
     84      *
     85      * @return associated logWriter
     86      */
     87     public LogWriter getLogWriter() {
     88         return logWriter;
     89     }
     90 }
     91