首页 > 数据库技术 > 详细

Oracle API Gateway(OAG) Policy Center

时间:2014-02-26 05:57:49      阅读:731      评论:0      收藏:0      [点我收藏+]
A policy is a network of message filters in which each filter is a modular unit that processes a message.
In the Policy Studio, the policy is displayed as a path through a set of filters. Each filter can have only one success path and one failure path. You can use these success and failure paths to create sophisticated rules. 
 
The following example screen shot shows an example policy with success paths and a single failure path:
bubuko.com,布布扣
1.Starting the Policy Studio
If you did not select to launch the Policy Studio automatically after installation,You can open a command prompt in the following directory:
-------------------------------------------
Windows      INSTALL_DIR\oagpolicystudio
Linux/UNIX   INSTALL_DIR/oagpolicystudio
-------------------------------------------
Start policystudio.
 
2.Start Policy Studio and connect to Policy Center.
bubuko.com,布布扣
 
3. You can deploy OAG sample policy. xml file like following:
---------------------------------------------------
<entityStoreData xmlns="http://www.vordel.com/2005/06/24/entityStore">
<metaInfo flags="138">
<exportRoots>
<key type=‘FilterCircuit‘>
<id field=‘name‘ value=‘oauth_accesstoken_validation‘/>
</key>
<key type=‘ESConfiguration‘>
<id field=‘name‘ value=‘Entity Store Configuration‘/>
</key>
</exportRoots>
<typeVersions>
<type name="AddHTTPHeaderFilter" version="5"/>
<type name="AttributeExtractHTTPHeaderFilter" version="0"/>
<type name="ChangeMessageFilter" version="0"/>
<type name="ConnectToURLFilter" version="2"/>
<type name="ConnectionFilter" version="13"/>
<type name="ConversionFilter" version="0"/>
<type name="ESConfiguration" version="13"/>
<type name="Entity" version="0"/>
<type name="Filter" version="5"/>
<type name="FilterCircuit" version="4"/>
<type name="JSONPath" version="0"/>
<type name="JSONPathFilter" version="0"/>
<type name="Reflector" version="0"/>
<type name="RootChild" version="0"/>
<type name="SaveToFileFilter" version="2"/>
<type name="SetHTTPStatusCode" version="0"/>
<type name="SetHTTPVerbFilter" version="0"/>
<type name="StringReplaceFilter" version="2"/>
</typeVersions>
<realizedTypes><![CDATA[
<entityStoreData>
<entityType xmlns="http://www.vordel.com/2005/06/24/entityStore" abstract="true" extends="Entity" name="Filter">
        <constant name="_version" type="integer" value="5"/>
        <field cardinality="?" name="successNode" type="@Filter"/>
        <field cardinality="?" name="failureNode" type="@Filter"/>
        <field isKey="true" name="name" type="string"/>
        <field cardinality="1" default="2" name="logMask" type="integer"/>
        <field cardinality="1" default="Filter aborted due to exception" name="logFatal" type="string"/>
        <field cardinality="1" default="Filter failed" name="logFailure" type="string"/>
        <field cardinality="1" default="Filter passed" name="logSuccess" type="string"/>
        <field cardinality="1" name="category" type="@Category">
            <defaultRef>
                <key type="CategoryGroup">
                  <id field="name" value="Filter Categories"/>
                  <key type="Category">
                      <id field="name" value="miscellaneous"/>
                  </key>
                </key>
            </defaultRef>
        </field>
      <field cardinality="1" default="0" name="abortProcessingOnLogError" type="boolean"/>
      <field cardinality="1" default="SERVICE" name="logMaskType" type="string"/>
      <field cardinality="*" name="classloader" type="^ClassLoader"/>
    </entityType>
............
</entityStoreData>
------------------------------------------------------------
4. import......, Policy studio shows as like this:
 
bubuko.com,布布扣

Oracle API Gateway(OAG) Policy Center

原文:http://www.cnblogs.com/lzhairs/p/3567409.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!