Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.core
Class Session

    java.lang.Object
      org.basex.core.Session

Direct Known Subclasses:
  ClientSession, LocalSession

    public abstract class Session

extends Object

This class allows a generic process execution. It is implemented both by the local as well as the client/server model.

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

Constructor Summary
`Session()`

Method Summary
`abstract void` | `close()` Closes the session.
`boolean` | `execute(Proc pr)` Executes a process.
`abstract boolean` | `execute(Proc pr, OutputStream out)` Executes a process and prints the result to the specified stream.
`boolean` | `execute(String pr)` Executes a command.
`abstract boolean` | `execute(String cmd, OutputStream out)` Executes a command and prints the result to the specified stream.
`abstract String` | `info()` Returns process info.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Session

    public Session()

Method Detail

### execute

    public abstract boolean execute(String cmd,
                                    OutputStream out)
                             throws IOException

  Executes a command and prints the result to the specified stream.

  Parameters:
    `cmd` - command to be executed
    `out` - output stream
  Returns:
    success of operation
  Throws:
    `IOException` - I/O exception

### execute

    public abstract boolean execute(Proc pr,
                                    OutputStream out)
                             throws IOException

  Executes a process and prints the result to the specified stream.

  Parameters:
    `pr` - process to be executed
    `out` - output stream
  Returns:
    success of operation
  Throws:
    `IOException` - I/O exception

### execute

    public final boolean execute(Proc pr)
                          throws IOException

  Executes a process. `execute(Proc, OutputStream)` should be called if textual results are expected.

  Parameters:
    `pr` - process to be executed
  Returns:
    success of operation
  Throws:
    `IOException` - I/O exception

### execute

    public final boolean execute(String pr)
                          throws IOException

  Executes a command. `execute(String, OutputStream)` should be called if textual results are expected.

  Parameters:
    `pr` - process to be executed
  Returns:
    success of operation
  Throws:
    `IOException` - I/O exception

### info

    public abstract String info()

  Returns process info.

  Returns:
    process info

### close

    public abstract void close()
                        throws IOException

  Closes the session.

  Throws:
    `IOException` - I/O exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD