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-08, ISC License, Christian Gruen

Constructor Summary
ClientProcess(java.lang.String h, int p, Process pr)
          Constructor, specifying the server host:port and the command to be sent.
 
Method Summary
 boolean execute(Context ctx)
          Executes a command.
 void info(PrintOutput o)
          Returns process info.
 void output(PrintOutput o)
          Serializes the textual results of a command.
 
Methods inherited from class org.basex.core.Progress
checkStop, det, detail, prog, progress, progress, stop, title
 
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,
                     Process pr)
Constructor, specifying the server host:port and the command to be sent.

Parameters:
h - name of the host
p - port
pr - process
Method Detail

execute

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

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

output

public void output(PrintOutput o)
            throws java.io.IOException
Description copied from class: AbstractProcess
Serializes the textual results of a command.

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

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