Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Package Attributes
ATPInterface.Server Class Reference

List of all members.

Public Member Functions

void run ()
 Server (InetAddress ip, int port, String[] options, int firstOptionIndex, int lastOptionIndex)

Static Public Member Functions

static void main (String[] args)

Protected Member Functions

void parseOptions (String[] args, int startIndex, int endIndex)

Static Protected Member Functions

static void printSyntaxHelp ()

Protected Attributes

InetAddress ip
Map openSessions
int port

Package Attributes

boolean verboseOutput = false

Detailed Description

A TCP server acting as network front-end to the assumption-based theorem prover.

The Server class has a main method requiring two command line arguments: the IP address and the port the server binds to.

The public method run() starts the server. The server accepts all incoming connections. For each incoming connection, an instance of the class Connection is created and the socket is passed to it. This instance is then responsible for handling the entire communication with the client and for closing the socket. A Connection instance runs in its own thread.

The communication protocol is called ATP (Assumption-based Theorem-prover Protocol). It is a text-based protocol which has some similarities to HTTP.

Author:
Joerg WEBER
Version:
1.0, DATE: 18.10.2005

Definition at line 50 of file Server.java.


Constructor & Destructor Documentation

ATPInterface.Server.Server ( InetAddress  ip,
int  port,
String[]  options,
int  firstOptionIndex,
int  lastOptionIndex 
) [inline]

Constructor getting the IP address and the port.

Definition at line 125 of file Server.java.


Member Function Documentation

static void ATPInterface.Server.main ( String[]  args) [inline, static]

The main method processes the command line arguments and then starts the server loop by calling run().

Definition at line 90 of file Server.java.

void ATPInterface.Server.parseOptions ( String[]  args,
int  startIndex,
int  endIndex 
) [inline, protected]

Definition at line 134 of file Server.java.

static void ATPInterface.Server.printSyntaxHelp ( ) [inline, static, protected]

Prints some help lines explaining the required command line arguments.

Definition at line 79 of file Server.java.

void ATPInterface.Server.run ( ) [inline]

Creates a server socket and enters an infinite loop waiting for incoming connections.

Creates a server socket and binds it to the IP and port passed to the constructor. Then an infinite loop is entered, in which the server waits for incoming connections For each incoming connection, a Connection instance is created and the socket is passed to it. Then the thread of the Connection instance is started, and the server continuous waiting for incoming connections.

Definition at line 153 of file Server.java.


Member Data Documentation

InetAddress ATPInterface.Server.ip [protected]

The IP address this server binds to.

Definition at line 53 of file Server.java.

A container of the sessions which are open at the moment.

This container maps session names to session instances. A session basically maintains a logical database. For each open session, there must be one or more connections which are associated with the session. A session is closed (by the Connection class) if there are no more connections referring to it.

A thread-safe map must be used, since a session may be accessed by several connections!!

Definition at line 70 of file Server.java.

int ATPInterface.Server.port [protected]

The port this server binds to.

Definition at line 56 of file Server.java.

boolean ATPInterface.Server.verboseOutput = false [package]

Command line option may set this to true.

Definition at line 75 of file Server.java.


The documentation for this class was generated from the following file:


tug_ist_diagnosis_engine
Author(s): Safdar Zaman, Gerald Steinbauer
autogenerated on Mon Jan 6 2014 11:51:16