//
// $Id: Test.idl 39255 2001-04-24 08:02:58Z coryan $
//

/// 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 AMI_Buffering
  {
    /// A simple operation to test the number of requests received.
    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 AMI_Buffering_Admin
  {
    /// Number of oneway requests received
    unsigned long request_count ();

    /// Number of bytes received
    unsigned long bytes_received_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 ();
  };
};
