001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.hbtop.terminal.impl.batch;
019
020import edu.umd.cs.findbugs.annotations.Nullable;
021import org.apache.hadoop.hbase.hbtop.terminal.CursorPosition;
022import org.apache.hadoop.hbase.hbtop.terminal.KeyPress;
023import org.apache.hadoop.hbase.hbtop.terminal.Terminal;
024import org.apache.hadoop.hbase.hbtop.terminal.TerminalPrinter;
025import org.apache.hadoop.hbase.hbtop.terminal.TerminalSize;
026
027public class BatchTerminal implements Terminal {
028
029  private static final TerminalPrinter TERMINAL_PRINTER = new BatchTerminalPrinter();
030
031  @Override
032  public void clear() {
033  }
034
035  @Override
036  public void refresh() {
037    // Add a new line
038    TERMINAL_PRINTER.endOfLine();
039  }
040
041  @Nullable
042  @Override
043  public TerminalSize getSize() {
044    return null;
045  }
046
047  @Nullable
048  @Override
049  public TerminalSize doResizeIfNecessary() {
050    return null;
051  }
052
053  @Nullable
054  @Override
055  public KeyPress pollKeyPress() {
056    return null;
057  }
058
059  @Override
060  public CursorPosition getCursorPosition() {
061    return null;
062  }
063
064  @Override
065  public void setCursorPosition(int column, int row) {
066  }
067
068  @Override
069  public void hideCursor() {
070  }
071
072  @Override
073  public TerminalPrinter getTerminalPrinter(int startRow) {
074    return TERMINAL_PRINTER;
075  }
076
077  @Override
078  public void close() {
079  }
080}