// **********************************************************************
//
// Copyright (c) 2002
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef OBPOA_POLICIES_IDL
#define OBPOA_POLICIES_IDL

#include <OB/Policy.idl>
#include <OB/Dispatch.idl>

#pragma prefix "ooc.com"

//
// ORBacus extensions
//

module OBPortableServer
{

/**
 * 
 * This policy type identifies the synchronization policy.
 *
 **/
const CORBA::PolicyType SYNCHRONIZATION_POLICY_ID = (256 + 1) | 0x4f4f0000;

/**
 *
 * This enumeration details the synchronization strategies for method
 * dispatch.
 *
 * @member NO_SYNCHRONIZATION No direct synchronization is applied
 * @member SYNCHRONIZE_ON_POA Method calls are synchronized on a POA
 * @member SYNCHRONIZE_ON_ORB Method calls are synchronized on the ORB
 *
 * @see SynchronizationPolicy
 *
 **/

enum SynchronizationPolicyValue
{
    NO_SYNCHRONIZATION,
    SYNCHRONIZE_ON_POA,
    SYNCHRONIZE_ON_ORB
};


/**
 *
 * The synchronization policy. This policy controls the method dispatch
 * synchronization policy.
 *
 * @see SynchronizationPolicyValue
 *
 **/

local interface SynchronizationPolicy : CORBA::Policy
{
    /**
     *
     * The SynchronizationPolicyValue value.
     *
     **/
    readonly attribute SynchronizationPolicyValue value;
};


/**
 * 
 * This policy type identifies the dispatch strategy policy.
 *
 **/
const CORBA::PolicyType DISPATCH_STRATEGY_POLICY_ID = (256 + 2) | 0x4f4f0000;


/**
 *
 * The dispatch strategy policy. This policy controls the method
 * dispatch strategy.
 *
 * @see OB::DispatchStrategy
 *
 **/

local interface DispatchStrategyPolicy : CORBA::Policy
{
    /**
     *
     * The DispatchStrategy value.
     *
     **/
    readonly attribute OB::DispatchStrategy value;
};

/**
 * 
 * This policy type identifies the interceptor call policy.
 *
 **/
const CORBA::PolicyType INTERCEPTOR_CALL_POLICY_ID = (256 + 3) | 0x4f4f0000;

/**
 *
 * The interceptor call policy. This policy controls whether the
 * server-side interceptors are called for a particular POA.
 *
 **/

local interface InterceptorCallPolicy : CORBA::Policy
{
    /**
     *
     * The InterceptorCallPolicy value.  If a POA has an
     * <code>InterceptorCallPolicy</code> set and <code>value</code> is
     * <code>FALSE</code> then any installed server-side interceptors are
     * not called for requests on this POA.  Otherwise, interceptors are
     * called for each request. The default value is <code>TRUE</code>.
     *
     **/
    readonly attribute boolean value;
};

}; // End module OB

#endif
