org.basex.core
Class LocalSession

java.lang.Object
  extended by org.basex.core.Session
      extended by org.basex.core.LocalSession
Direct Known Subclasses:
ServerSession

public class LocalSession
extends Session

This wrapper executes commands locally.

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

Constructor Summary
LocalSession(Context context)
          Constructor.
 
Method Summary
 void close()
          Closes the session.
 boolean execute(Proc pr, OutputStream out)
          Executes a process and prints the result to the specified stream.
 boolean execute(String str, OutputStream out)
          Executes a command and prints the result to the specified stream.
 String info()
          Returns process info.
 
Methods inherited from class org.basex.core.Session
execute, execute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalSession

public LocalSession(Context context)
Constructor.

Parameters:
context - context
Method Detail

execute

public boolean execute(String str,
                       OutputStream out)
                throws IOException
Description copied from class: Session
Executes a command and prints the result to the specified stream.

Specified by:
execute in class Session
Parameters:
str - command to be executed
out - output stream
Returns:
success of operation
Throws:
IOException - I/O exception

execute

public boolean execute(Proc pr,
                       OutputStream out)
Description copied from class: Session
Executes a process and prints the result to the specified stream.

Specified by:
execute in class Session
Parameters:
pr - process to be executed
out - output stream
Returns:
success of operation

info

public String info()
Description copied from class: Session
Returns process info.

Specified by:
info in class Session
Returns:
process info

close

public void close()
Description copied from class: Session
Closes the session.

Specified by:
close in class Session