//
// $Id: Test.idl 78130 2007-04-20 09:59:59Z sma $
//

/// Put the interfaces in a module, to avoid global namespace pollution
module Test
{
  /// A sequence of octets to generate bigger messages
  typedef sequence<octet> Payload;

  /// Clients use this interface to send oneway requests
  interface Oneway_Buffering
  {
    /// Return a simple string
    oneway void receive_data (in Payload the_payload);

    /// An empty operation to force a flush in the ORB queues
    oneway void flush ();

    /// Synchronize the state with the Admin object.
    /**
     * Once flush() has been invoked (with the correct buffering
     * policies) we must use sync() to ensure that both the main
     * server and the Admin servers are in sync.
     */
    void sync ();

    /// Shutdown the server
    void shutdown ();
  };

  /// Clients use this interface to query the number of oneway
  /// requests received.
  interface Oneway_Buffering_Admin
  {
    /// Number of oneway requests received
    unsigned long request_count (in unsigned long expected_count);

    /// Number of bytes received
    unsigned long bytes_received_count (in unsigned long expected_count);

    /// The Oneway_Buffering interface uses this method to report any
    /// request received.
    void request_received (in unsigned long payload_length);

    /// An empty operation to force a flush in the ORB queues
    void flush ();

    /// A method to shutdown the ORB
    /**
     * This method is used to simplify the test shutdown process
     */
    void shutdown ();
  };
};
