org.basex.core
Class ClientProcess

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.core.AbstractProcess
          extended by org.basex.core.ClientProcess

public final class ClientProcess
extends AbstractProcess

This class sends client commands to the server instance over a socket. It extends the AbstractProcess class.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.core.AbstractProcess
cmd
 
Constructor Summary
ClientProcess(java.lang.String h, int p, Command c)
          Constructor, specifying the server host:port and the command to be sent.
 
Method Summary
 java.lang.String det()
          Returns detailed information on this progress.
 boolean execute()
          Processes a command.
 java.lang.String head()
          Returns short information on this process.
 void info(PrintOutput o)
          Returns process info.
 void output(PrintOutput o)
          Processes a command.
 double prog()
          Returns progress information.
 
Methods inherited from class org.basex.core.Progress
detail, header, progress, progress, stop, stopped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientProcess

public ClientProcess(java.lang.String h,
                     int p,
                     Command c)
Constructor, specifying the server host:port and the command to be sent.

Parameters:
h - name of the host
p - port
c - command
Method Detail

det

public java.lang.String det()
Description copied from class: Progress
Returns detailed information on this progress.

Returns:
information in detail

execute

public boolean execute()
                throws java.io.IOException
Description copied from class: AbstractProcess
Processes a command.

Specified by:
execute in class AbstractProcess
Returns:
success of operation
Throws:
java.io.IOException - I/O exception

head

public java.lang.String head()
Description copied from class: Progress
Returns short information on this process.

Returns:
header information

info

public void info(PrintOutput o)
          throws java.io.IOException
Description copied from class: AbstractProcess
Returns process info.

Specified by:
info in class AbstractProcess
Parameters:
o - output stream
Throws:
java.io.IOException - I/O exception

output

public void output(PrintOutput o)
            throws java.io.IOException
Description copied from class: AbstractProcess
Processes a command.

Specified by:
output in class AbstractProcess
Parameters:
o - output stream
Throws:
java.io.IOException - I/O exception

prog

public double prog()
Description copied from class: Progress
Returns progress information.

Returns:
header information