Loading...
Searching...
No Matches
BALL::VIEW::ServerWidget::BALLViewServer Class Reference

`#include <BALL/VIEW/KERNEL/serverWidget.h>`

Inheritance diagram for BALL::VIEW::ServerWidget::BALLViewServer:

## Public Member Functions

| BALLViewServer (ServerWidget *parent, Size port, bool restart=true)
void | sendObject ()
virtual void | run ()
virtual void | handleConnection ()
void | setLocked (bool is_locked)
Public Member Functions inherited from BALL::VIEW::BALLThread
| BALLThread ()
void | setMainControl (MainControl *mf)
void | setComposite (Composite *composite)
Composite * | getComposite ()
Public Member Functions inherited from BALL::TCPServerThread
| TCPServerThread (Size port, bool asynchronous=true, bool restart=true)
virtual void | deactivate ()
virtual void | activate_async ()
virtual void | handleAsyncConnection ()
virtual void | handleClose ()
bool | isRunning ()
Public Member Functions inherited from BALL::TCPServer
| TCPServer (Size port, bool restart=true)
virtual | ~TCPServer ()
virtual void | activate ()
virtual void | startAccepting ()
virtual void | connectionRequested ()
void | setPort (Size port)
Size | getPort () const

## Protected Types

typedef HashMap< unsigned long, Composite * > | CompositeHashMap

## Protected Attributes

ServerWidget * | parent_widget_
Composite * | received_composite_
CompositeHashMap | composite_hashmap_
Size | port_
bool | is_locked_
Protected Attributes inherited from BALL::VIEW::BALLThread
MainControl * | main_control_
Composite * | composite_
Protected Attributes inherited from BALL::TCPServerThread
bool | use_async_io_
bool | is_running_
Protected Attributes inherited from BALL::TCPServer
Size | port_
bool | restart_
TCPIOStream | connected_stream_
boost::asio::io_context | io_service_
boost::asio::ip::tcp::acceptor | acceptor_

## Additional Inherited Members

Protected Member Functions inherited from BALL::VIEW::BALLThread
void | sendMessage_ (Message *msg)
void | updateStructure_ ()
void | output_ (const String &string, bool important=false)
| Sends the string as outout to Log.info.
void | waitForUpdateOfRepresentations_ ()

## Detailed Description

BALLView server thread. This class handles the incoming connections for the simple BALL-protocol for sending composites over the net.

Definition at line 90 of file serverWidget.h.

## Member Typedef Documentation

## CompositeHashMap

typedef HashMap<unsigned long, Composite *> BALL::VIEW::ServerWidget::BALLViewServer::CompositeHashMap

protected

Definition at line 124 of file serverWidget.h.

## Constructor & Destructor Documentation

## BALLViewServer()

BALL::VIEW::ServerWidget::BALLViewServer::BALLViewServer | ( | ServerWidget * | parent,
|  | Size | port,
|  | bool | restart = true )

## Member Function Documentation

## handleConnection()

virtual void BALL::VIEW::ServerWidget::BALLViewServer::handleConnection | ( |  | ) |

virtual

Handler for successful connections. Virtually overridden method. This method handles the socket stream. When a connection has been made, this function is automatically called through our base classes. Then, the socket stream will be passed onto the object creator and incoming objects will be received. At the moment only Composite objects will be accepted. If another object is received the exception NotCompositeObject will be thrown.

Exceptions

  NotCompositeObject | thrown if another object than Composite object is received

Reimplemented from BALL::TCPServer.

## run()

virtual void BALL::VIEW::ServerWidget::BALLViewServer::run | ( |  | ) |

virtual

Overloaded from QThread::run(), overload again in derived classes!

Reimplemented from BALL::VIEW::BALLThread.

## sendObject()

void BALL::VIEW::ServerWidget::BALLViewServer::sendObject | ( |  | ) |

private methodes used for reacting to client requests.

Exceptions

  BALL::VIEW::ServerWidget::NotCompositeObject |

## setLocked()

void BALL::VIEW::ServerWidget::BALLViewServer::setLocked | ( | bool | is_locked | ) |

Used for communication with the parent

## Member Data Documentation

## composite_hashmap_

CompositeHashMap BALL::VIEW::ServerWidget::BALLViewServer::composite_hashmap_

protected

Definition at line 125 of file serverWidget.h.

## is_locked_

bool BALL::VIEW::ServerWidget::BALLViewServer::is_locked_

protected

Definition at line 128 of file serverWidget.h.

## parent_widget_

ServerWidget* BALL::VIEW::ServerWidget::BALLViewServer::parent_widget_

protected

Definition at line 121 of file serverWidget.h.

## port_

Size BALL::VIEW::ServerWidget::BALLViewServer::port_

protected

Definition at line 127 of file serverWidget.h.

## received_composite_

Composite* BALL::VIEW::ServerWidget::BALLViewServer::received_composite_

protected

Definition at line 122 of file serverWidget.h.