Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Big_Oneways / Test.idl
blob165def1a8239ebbbffcca5d15136404cbfae8ace
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 /// Ping the session, used to validate all connections
61 void ping ();
63 /// Receive the payload
64 oneway void receive_payload (in Payload the_payload);
66 /// Destroy the Session object
67 void destroy ();
70 interface Coordinator
72 /// Add a new peer.
73 /**
74 * The coordinator starts the test by calling <send_oneways> on
75 * all peers. How does it decide to do that is application
76 * specific.
78 void add_peer (in Peer the_peer);