openlsd.network.server.LSDServerInstance Class Reference

Collaboration diagram for openlsd.network.server.LSDServerInstance:

Collaboration graph
[legend]

List of all members.


Detailed Description

This Class is an instance of a server (User, Compressed, Protected or Admin).

Author:
Frederic Bregier LGPL

Public Member Functions

 LSDServerInstance (int server_port, boolean compressionserver, boolean compressionclient, String password, boolean[] functions, String name)
boolean isServerOK ()
boolean startServerInstance ()
void stopServerInstance (boolean wait)
String toString ()

Static Public Member Functions

static boolean isSessionOK (IoSession session)
static boolean isLSDCommonSessionOK (IoSession session)

Public Attributes

int SERVER_PORT = 8080
boolean COMPRESSIONSERVER = false
boolean COMPRESSIONCLIENT = false
String password = "empty"
String name = null

Protected Attributes

ExecutorService executorSerial = null
SocketAcceptor acceptor = null
InetSocketAddress inetSocketAddress = null
LSDDemuxingIoHandler lsdDemuxingIoHandler = null
AtomicLong nbsession = null
boolean running = false

Private Attributes

boolean[] functions
boolean isClosed = true

Constructor & Destructor Documentation

openlsd.network.server.LSDServerInstance.LSDServerInstance ( int  server_port,
boolean  compressionserver,
boolean  compressionclient,
String  password,
boolean[]  functions,
String  name 
)

Constructor for one ServerInstance

Parameters:
server_port the port for the server
compressionserver to set the compression on or off on server's message
compressionclient to set the compression on or off on client's message
password the associated password
functions to set the associated functions
name the associated name


Member Function Documentation

static boolean openlsd.network.server.LSDServerInstance.isSessionOK ( IoSession  session  )  [static]

Returns the status of one session attached to this LSI

Parameters:
session 
Returns:
True if the status is OK

static boolean openlsd.network.server.LSDServerInstance.isLSDCommonSessionOK ( IoSession  session  )  [static]

Returns the logical status of one session (legal to continue)

Parameters:
session 
Returns:
True if the status is OK

boolean openlsd.network.server.LSDServerInstance.isServerOK (  ) 

Returns the status of the server attached to this LSI

Returns:
True if the status is OK

boolean openlsd.network.server.LSDServerInstance.startServerInstance (  ) 

Start the ServerInstance

Returns:
True if OK, else False

void openlsd.network.server.LSDServerInstance.stopServerInstance ( boolean  wait  ) 

Stop the ServerInstance

Parameters:
wait boolean to decide if the Server stop should wait on session already connected to finished normally or not.

String openlsd.network.server.LSDServerInstance.toString (  ) 

See also:
java.lang.Object.toString()


Member Data Documentation

ExecutorService openlsd.network.server.LSDServerInstance.executorSerial = null [protected]

IoAcceptor and other fields for server Executor for Serialization

SocketAcceptor openlsd.network.server.LSDServerInstance.acceptor = null [protected]

Acceptor

InetSocketAddress openlsd.network.server.LSDServerInstance.inetSocketAddress = null [protected]

The socket Address

The default DemuxingIoHandler

The port of the server

Is this server compresses from Server message

Is this server compressed from Client message

The associated password for the server (specific functions to protect)

The name of this server

Initial value:

 {false,false,false,false,
            false,false,false,false,false}
Array of boolean that set the associated functions

The number of sessions

The status of this server (running true implies isClosed false)

Is this server really closed (isClosed true implies running false)


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