Public Types
- enum StartServer { noServer = 0,
startUnixServer = 1,
startTCPServer = 2,
noAuthentication = 4
}
Public Methods
Public Static Methods
Protected Methods
Protected Members
| static Dispatcher * _instance
| _instance |
[protected]
| Pool<Buffer> requestResultPool
| requestResultPool |
[protected]
| Pool<Object_skel> objectPool
| objectPool |
[protected]
| std::list<Connection *> connections
| connections |
[protected]
| std::string serverID
| serverID |
[protected]
void generateServerID ()
| generateServerID |
[protected]
| bool deleteIOManagerOnExit
| deleteIOManagerOnExit |
[protected]
| TCPServer * tcpServer
| tcpServer |
[protected]
| UnixServer * unixServer
| unixServer |
[protected]
| IOManager * _ioManager
| _ioManager |
[protected]
| FlowSystem_impl * _flowSystem
| _flowSystem |
[protected]
| ObjectManager * objectManager
| objectManager |
[protected]
| ReferenceClean * referenceClean
| referenceClean |
[protected]
| NotificationManager * notificationManager
| notificationManager |
[protected]
| mcop_sighandler orig_sigpipe
| orig_sigpipe |
[protected]
| Connection * _activeConnection
| _activeConnection |
[protected]
Connection * connectUrl (const std::string& url)
| connectUrl |
[protected]
connects to a given URL
Returns: a valid connection, or a 0 pointer on error
| enum StartServer { noServer = 0,
startUnixServer = 1,
startTCPServer = 2,
noAuthentication = 4
}
| StartServer |
Dispatcher (IOManager *ioManager = 0, StartServer startServer = noServer)
| Dispatcher |
~Dispatcher ()
| ~Dispatcher |
[static]
inline IOManager * ioManager ()
| ioManager |
InterfaceRepo interfaceRepo ()
| interfaceRepo |
FlowSystem_impl * flowSystem ()
| flowSystem |
GlobalComm globalComm ()
| globalComm |
void setFlowSystem (FlowSystem_impl *fs)
| setFlowSystem |
void refillRequestIDs ()
| refillRequestIDs |
Buffer * waitForResult (long requestID,Connection *connection)
| waitForResult |
Buffer * createRequest (long& requestID, long objectID, long methodID)
| createRequest |
Buffer * createOnewayRequest (long objectID, long methodID)
| createOnewayRequest |
void handle (Connection *conn, Buffer *buffer, long messageType)
| handle |
void handleCorrupt (Connection *conn)
| handleCorrupt |
long addObject (Object_skel *object)
| addObject |
object registration
do not call manually, this is used by the Object_skel constructor
to register itself
void removeObject (long objectID)
| removeObject |
object deregistration
do not call manually, this is called by the Object_skel destructor
as soon as the object is deleted
void * connectObjectLocal (ObjectReference& reference, std::string interface)
| connectObjectLocal |
connects to a local object, returning a readily casted "interface" *
if success, or NULL if this object is not local
Connection * connectObjectRemote (ObjectReference& reference)
| connectObjectRemote |
connects to a remote object, establishing a connection if necessary
returns NULL if connecting fails or object isn't present or whatever
else could go wrong
std::string objectToString (long objectID)
| objectToString |
stringification of objects (only used by the object implementations,
which in turn provide a _toString method)
bool stringToObjectReference (ObjectReference& r, std::string s)
| stringToObjectReference |
destringification of objects (mainly used by the object implementations,
which in turn provide a _fromString method)
main loop
void terminate ()
| terminate |
this function quits the main loop (it must be running, of course)
and causes the run() function to return.
void initiateConnection (Connection *connection)
| initiateConnection |
Is called by the transport services as soon as a new connection is
created - this will send authentication request, etc.
void handleConnectionClose (Connection *connection)
| handleConnectionClose |
Is called by the Connection as soon as the connection goes down,
which may happen due to a normal cause (client exits), and may
happen if an error occurs as well (network down)
[static]
Locks the dispatcher. Whenever you want to do anything with any kind
of aRts object, you will hold a lock on Arts::Dispatcher. There is
only one exception to the rule, and that is: you don't have to lock
the dispatcher when the lock is already held.
Generally, that is very often the case. Typical situations where you
don't need to lock() the Dispatcher are:
- you receive a callback from the IOManager (timer or fd)
- you get call due to some MCOP request
- you are called from the NotificationManager
- you are called from the FlowSystem (calculateBlock)
[static]
Unlocks the dispatcher. Do this to release a lock you hold on
the Arts::Dispatcher.
[static]
Wakes the dispatcher - normally, the dispatcher will go to sleep in
it's event loop, when nothing is to be done. If you change things from
another thread, like: add a new Timer, write something to a connection,
and so on, the dispatcher will not notice it. To wake the dispatcher
up, this call is provided.
Connection * activeConnection ()
| activeConnection |
- internal usage only -
this will return the Connection the last request came from
Connection * loopbackConnection ()
| loopbackConnection |
- internal usage only -
this will return a loopback Connection for sending requests to myself
DelayedReturn * delayReturn ()
| delayReturn |
- internal usage only -
this will cause a function to return from a request later
See also: DelayedReturn
void reloadTraderData ()
| reloadTraderData |
reloads the trader data (do this if things have been added/changed
there)
| Generated by: stefan on stefan on Sat Jun 2 23:13:28 2001, using kdoc 2.0a53. |