Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Big_Twoways / Test.idl
blobd13f9878e6e739312639e6a7e82f6b0adecadf63
2 module Test
4 /// The message type, just used to send a lot of data on each
5 /// request
6 typedef sequence<octet> Payload;
8 /// A session is a single instance of the test
9 interface Session;
10 typedef sequence<Session> Session_List;
12 /// A session control is used to determine if all the Session in an
13 /// experiment have finished.
14 /**
15 * @param success If false then the session failed, the experiment
16 * is successful only if all sessions finish successfully
18 interface Session_Control
20 void session_finished (in boolean success);
23 /// A Peer is used to create sessions
24 interface Peer
26 /// Create a new session
27 /**
28 * @param payload_size The size of each message
29 * @param thread_count The number of threads that each session
30 * must create
31 * @param message_count How many messages does each thread send.
33 Session create_session (in Session_Control control,
34 in unsigned long payload_size,
35 in unsigned long thread_count,
36 in unsigned long message_count,
37 in unsigned long peer_count);
39 /// Shutdown the peer
40 oneway void shutdown ();
43 /// The Session already has an experiment running.
44 exception Already_Running {};
46 /// The experiment requires at least two Sessions
47 exception No_Peers {};
49 interface Session
51 /// Start the test, send messages to all the peers
52 /**
53 * @param other_sessions The list of sessions participating in the
54 * experiment, this list must not include the session
55 * receiving the start() call.
57 void start (in Session_List other_sessions)
58 raises (Already_Running, No_Peers);
60 /// Echo back the payload
61 Payload echo_payload (in Payload the_payload);
63 /// Destroy the Session object
64 void destroy ();
67 interface Coordinator
69 /// Add a new peer.
70 /**
71 * The coordinator starts the test by calling <send_oneways> on
72 * all peers. How does it decide to do that is application
73 * specific.
75 void add_peer (in Peer the_peer);