BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
BALL::VIEW::ServerWidget::BALLViewServer Class Reference

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

Inheritance diagram for BALL::VIEW::ServerWidget::BALLViewServer:
BALL::VIEW::BALLThread BALL::TCPServerThread QThread BALL::TCPServer QThread

Public Member Functions

 BALLViewServer (ServerWidget *parent, Size port, bool restart=true)
 
void sendObject () throw (NotCompositeObject)
 
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)
 
CompositegetComposite ()
 
- 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

ServerWidgetparent_widget_
 
Compositereceived_composite_
 
CompositeHashMap composite_hashmap_
 
Size port_
 
bool is_locked_
 
- Protected Attributes inherited from BALL::VIEW::BALLThread
MainControlmain_control_
 
Compositecomposite_
 
- 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_
 
BALL_ASIO_NAMESPACE::io_service io_service_
 
BALL_ASIO_NAMESPACE::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. More...
 
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

Definition at line 124 of file serverWidget.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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
NotCompositeObjectthrown if another object than Composite object is received

Reimplemented from BALL::TCPServer.

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

Reimplemented from BALL::TCPServerThread.

void BALL::VIEW::ServerWidget::BALLViewServer::sendObject ( )
throw (NotCompositeObject
)

private methodes used for reacting to client requests.

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

Used for communication with the parent

Member Data Documentation

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

Definition at line 125 of file serverWidget.h.

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

Definition at line 128 of file serverWidget.h.

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

Definition at line 121 of file serverWidget.h.

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

Definition at line 127 of file serverWidget.h.

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

Definition at line 122 of file serverWidget.h.