| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>SPI Reference-zh - Dubbo - Alibaba Open Sesame</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <meta http-equiv="X-UA-Compatible" content="IE=8"> |
| <meta charset="UTF-8"> |
| |
| <!-- Deprecated since 3.4. To be removed in a future version of Confluence; use AJS.Confluence.getContextPath() --> |
| <meta id="confluence-context-path" name="confluence-context-path" content="/wiki"> |
| <meta name="ajs-context-path" content="/wiki"> |
| <meta name="ajs-version-number" content="3.5.9"> |
| <meta name="ajs-build-number" content="2166"> |
| <meta id="atlassian-token" name="atlassian-token" content="c116db80711201b36e2067aa83f3b044c2d5a30e"> |
| <meta id="confluence-space-key" name="confluence-space-key" content="dubbo"> |
| <meta name="ajs-remote-user" content=""> |
| <meta name="ajs-static-resource-url-prefix" content="/wiki/s/en/2166/34/_"> |
| |
| <script type="text/javascript"> |
| // Deprecated global variables. To be removed in a future version of Confluence. |
| var contextPath = '/wiki'; |
| </script> |
| |
| |
| |
| <!-- include system css resources --> |
| <link type="text/css" rel="stylesheet" href="batch.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css" media="all"> |
| <!--[if IE]> |
| <link type="text/css" rel="stylesheet" href="batch.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css?ieonly=true" media="all"> |
| <![endif]--> |
| <link type="text/css" rel="stylesheet" href="batch.css-media=print.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/css/batch.css?media=print" media="print"> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.confluence.ext.newcode-macro-plugin-sh-theme-confluence.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:sh-theme-confluence/com.atlassian.confluence.ext.newcode-macro-plugin:sh-theme-confluence.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="confluence-forms.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/resources/confluence.web.resources:aui-forms/confluence-forms.css" media="all"> |
| <!--[if IE]> |
| <link type="text/css" rel="stylesheet" href="confluence.web.resources-aui-forms.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:aui-forms/confluence.web.resources:aui-forms.css?ieonly=true" media="all"> |
| <![endif]--> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.confluence.plugins.share-page-mail-page-resources.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.8/_/download/batch/com.atlassian.confluence.plugins.share-page:mail-page-resources/com.atlassian.confluence.plugins.share-page:mail-page-resources.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="confluence.web.resources-view-comment.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:view-comment/confluence.web.resources:view-comment.css" media="all"> |
| <!--[if IE]> |
| <link type="text/css" rel="stylesheet" href="confluence.web.resources-view-comment.css-ieonly=true.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/confluence.web.resources:view-comment/confluence.web.resources:view-comment.css?ieonly=true" media="all"> |
| <![endif]--> |
| <link type="text/css" rel="stylesheet" href="confluence.macros.advanced-fancy-box.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:fancy-box/confluence.macros.advanced:fancy-box.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.confluence.plugins.drag-and-drop-support.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:support/com.atlassian.confluence.plugins.drag-and-drop:support.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.plugins.shortcuts.atlassian-shortcuts-module-shortcuts.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/0.8/_/download/batch/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts.css" media="all"> |
| <link type="text/css" rel="stylesheet" href="com.atlassian.confluence.keyboardshortcuts-confluence-keyboard-shortcuts.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3.5.9/_/download/batch/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts.css" media="all"> |
| |
| <!-- end system css resources --> |
| |
| <link rel="stylesheet" href="combined.css-spaceKey=dubbo.css" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3/_/styles/combined.css?spaceKey=dubbo" type="text/css"> |
| |
| <meta name="confluence-request-time" content="1392025447035"> |
| |
| <meta name="loggedInUsername" content=""> |
| <meta name="ajs-keyboardshortcut-hash" content="bf02a79603372a43d395a0a429bdf66"> |
| <!-- Deprecated since 3.4. To be removed in a future version of Confluence; use atl.header --> |
| <script type="text/x-template" title="share-content-popup"> |
| <form action="#" method="post" class="aui share-content-popup"> |
| <fieldset> |
| <label for="users">User name or email</label> |
| <div class="autocomplete-user-target"> |
| <input class="text autocomplete-sharepage" id="users" data-max="10" data-dropdown-target=".autocomplete-user-target" data-none-message="No matching user or email found"/> |
| </div> |
| <ol class="recipients"> |
| </ol> |
| <div><label for="note">Note</label></div> |
| <textarea class="textarea" id="note" placeholder="Add an optional note"/> |
| </fieldset> |
| <div class="button-panel"> |
| <div class="progress-messages-icon"></div> |
| <div class="progress-messages"> |
| </div> |
| <input class="button submit" type="submit" value="Share" disabled/> |
| <a class="close-dialog" href="#">Cancel</a> |
| </div> |
| </form> |
| </script> |
| |
| <script type="text/x-template" title="share-content-popup-recipient-username"> |
| <li data-username="{username}" style="display: none"> |
| <span> |
| <img src="{thumbnailLink.href}" title="{title}"> |
| <span>{title}</span> |
| <span class="remove-recipient"/> |
| </span> |
| </li> |
| </script> |
| |
| <script type="text/x-template" title="share-content-popup-recipient-email"> |
| <li data-email="{email}" style="display: none"> |
| <span> |
| <img src="{icon}" title="{email}"> |
| <span>{email}</span> |
| <span class="remove-recipient"/> |
| </span> |
| </li> |
| </script> |
| <meta name="ajs-use-keyboard-shortcuts" content="true"> |
| |
| <link rel="shortcut icon" href="/wiki/favicon.ico"> |
| <link rel="icon" type="image/png" href="/wiki/s/en/2166/34/_/images/logo/confluence_16.png"> |
| |
| <link rel="search" type="application/opensearchdescription+xml" href="/wiki/opensearch/osd.action" title="Alibaba Open Sesame"/> |
| |
| <!-- include system javascript resources --> |
| |
| |
| <script type="text/javascript" src="batch.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/batch.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.ext.newcode-macro-plugin-syntaxhighlighter-brushes.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9.10/_/download/batch/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter-brushes/com.atlassian.confluence.ext.newcode-macro-plugin:syntaxhighlighter-brushes.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.plugins.share-page-mail-page-resources.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.8/_/download/batch/com.atlassian.confluence.plugins.share-page:mail-page-resources/com.atlassian.confluence.plugins.share-page:mail-page-resources.js" ></script> |
| <script type="text/javascript" src="confluence.macros.advanced-fancy-box.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:fancy-box/confluence.macros.advanced:fancy-box.js" ></script> |
| <script type="text/javascript" src="confluence.macros.advanced-thumbnail-images.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.16/_/download/batch/confluence.macros.advanced:thumbnail-images/confluence.macros.advanced:thumbnail-images.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.plugins.drag-and-drop-support.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:support/com.atlassian.confluence.plugins.drag-and-drop:support.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.plugins.drag-and-drop-drag-and-drop-for-view-content.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0.16/_/download/batch/com.atlassian.confluence.plugins.drag-and-drop:drag-and-drop-for-view-content/com.atlassian.confluence.plugins.drag-and-drop:drag-and-drop-for-view-content.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.plugins.doctheme-splitter.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.9/_/download/batch/com.atlassian.confluence.plugins.doctheme:splitter/com.atlassian.confluence.plugins.doctheme:splitter.js" ></script> |
| <script type="text/javascript" src="com.atlassian.plugins.shortcuts.atlassian-shortcuts-module-shortcuts.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/0.8/_/download/batch/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts/com.atlassian.plugins.shortcuts.atlassian-shortcuts-module:shortcuts.js" ></script> |
| <script type="text/javascript" src="com.atlassian.confluence.keyboardshortcuts-confluence-keyboard-shortcuts.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/3.5.9/_/download/batch/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts/com.atlassian.confluence.keyboardshortcuts:confluence-keyboard-shortcuts.js" ></script> |
| <script type="text/javascript" src="legacy.confluence.web.resources-prototype.js" tppabs="http://10.20.160.198/wiki/s/en/2166/34/1.0/_/download/batch/legacy.confluence.web.resources:prototype/legacy.confluence.web.resources:prototype.js" ></script> |
| |
| |
| <!-- end system javascript resources --> |
| |
| |
| |
| |
| <link rel="canonical" href="http://code.alibabatech.com/wiki/display/dubbo/SPI+Reference-zh"> |
| <link rel="shortlink" href="http://code.alibabatech.com/wiki/x/5gNq"> |
| <meta name="wikilink" content="[dubbo:SPI Reference-zh]"> |
| <meta name="page-version" content="26"> |
| |
| </head> |
| |
| <body onload="placeFocus()" |
| id="com-atlassian-confluence" class="theme-default "> |
| <ul id="assistive-skip-links" class="assistive"> |
| <li><a href="#title-heading">Skip to content</a></li> |
| <li><a href="#breadcrumbs">Skip to breadcrumbs</a></li> |
| <li><a href="#header-menu-bar">Skip to header menu</a></li> |
| <li><a href="#navigation">Skip to action menu</a></li> |
| <li><a href="#quick-search-query">Skip to quick search</a></li> |
| </ul> |
| <div id="page"> |
| <div id="full-height-container"> |
| |
| |
| |
| <fieldset class="hidden parameters"> |
| <input type="hidden" id="shortcutDialogTip" value="Shortcut tip: Pressing <b>{shortcut}</b> also opens this dialog box"> |
| <input type="hidden" title="i18n.close.name" value="Close"> |
| <input type="hidden" title="i18n.cancel.name" value="Cancel"> |
| </fieldset><fieldset class="hidden parameters"> |
| <input type="hidden" id="statusDialogHeading" value="What are you working on?"> |
| <input type="hidden" id="statusDialogAccessibilityLabel" value="Enter your status (140 character limit)"> |
| <input type="hidden" id="statusDialogLatestLabel" value="Last update:"> |
| <input type="hidden" id="statusDialogUpdateButtonLabel" value="Update"> |
| <input type="hidden" id="statusDialogCancelButtonLabel" value="Cancel"> |
| </fieldset> |
| |
| <fieldset class="hidden parameters"> |
| <input type="hidden" id="globalSettingsAttachmentMaxSize" value="10485760"> |
| <input type="hidden" id="userLocale" value="en_GB"> |
| <input type="hidden" id="staticResourceUrlPrefix" value="/wiki/s/en/2166/34/_"> |
| <input type="hidden" id="contextPath" value="/wiki"> |
| </fieldset> |
| |
| |
| <div id="header" class="" style="display: none"> |
| <form id="quick-search" class="quick-search" method="get" action="http://10.20.160.198/wiki/dosearchsite.action"> |
| <fieldset> |
| <label class="assistive" for="quick-search-query">Quick Search</label> |
| <input class="quick-search-query" id="quick-search-query" type="text" accessKey="q" autocomplete="off" name="queryString" size="25" title="Quick Search" /> |
| <input class="quick-search-submit" id="quick-search-submit" type="submit" value="Search" /> |
| <div class="aui-dd-parent quick-nav-drop-down"><!-- Quick nav appears here --></div> |
| </fieldset> |
| <fieldset class="hidden parameters"> |
| <input type="hidden" id="quickNavEnabled" value="true" /> |
| </fieldset> |
| </form> |
| <ul id="header-menu-bar" class="ajs-menu-bar"> |
| |
| |
| <li class="normal ajs-menu-item"> |
| <a id="browse-menu-link" class="browse trigger ajs-menu-title" href="#"><span><span>Browse</span></span></a> <div class="assistive ajs-drop-down"> |
| <ul id="browse-menu-link-leading" class="section-leading first"> |
| <li> |
| |
| |
| |
| <a id="space-pages-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/listpages.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/listpages.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/pages/listpages.action?key=dubbo" class="" title="Browse pages in the Dubbo space"> |
| <span>Pages</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-blogposts-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/pages/viewrecentblogposts.action?key=dubbo" class="" title="Browse blogs in the Dubbo space"> |
| <span>Blog</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-labels-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/labels/listlabels-heatmap.action?key=dubbo" class="" title="Browse labels in the Dubbo space"> |
| <span>Labels</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-attachments-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/listattachmentsforspace.action?key=dubbo" class="" title="Browse attachments in the Dubbo space"> |
| <span>Attachments</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-mail-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/viewmailarchive.action?key=dubbo" class="" title="Browse mail in the Dubbo space"> |
| <span>Mail</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-advanced-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/viewspacesummary.action?key=dubbo" class="" title="Browse additional space functions in the Dubbo space"> |
| <span>Advanced</span></a> </li> |
| <li> |
| |
| |
| |
| <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo%27" tppabs="http://10.20.160.198/wiki/spaces/usage/report.action?key=dubbo" class="" title=""> |
| <span>Activity</span></a> </li> |
| </ul> |
| <ul id="browse-menu-link-global" class="section-global"> |
| <li> |
| |
| |
| |
| <a id="whats-new-menu-link" href="javascript:if(confirm(%27http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe%27" tppabs="http://docs.atlassian.com/confluence/docs-35/whatsnew/iframe" class="" title=""> |
| <span>What’s New</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="people-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/peopledirectory.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/peopledirectory.action%27" tppabs="http://10.20.160.198/wiki/peopledirectory.action" class="" title="Browse the Confluence people directory"> |
| <span>People Directory</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="space-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/spacedirectory/view.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/spacedirectory/view.action%27" tppabs="http://10.20.160.198/wiki/spacedirectory/view.action" class="" title="Browse the Confluence space directory"> |
| <span>Space Directory</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="keyboard-shortcuts-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki%27" tppabs="http://10.20.160.198/wiki" class="" title="View available keyboard shortcuts"> |
| <span>Keyboard Shortcuts</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="gadget-directory-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki%27" tppabs="http://10.20.160.198/wiki" class="user-item administration-link" title="Browse gadgets provided by Confluence"> |
| <span>Confluence Gadgets</span></a> </li> |
| </ul> |
| </div> |
| </li> |
| |
| <li class="ajs-menu-item normal"> |
| |
| |
| |
| <a id="login-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FSPI%2BReference-zh \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FSPI%2BReference-zh%27" tppabs="http://10.20.160.198/wiki/login.action?os_destination=%2Fdisplay%2Fdubbo%2FSPI%2BReference-zh" class="user-item login-link" title=""> |
| <span>Log In</span></a> </li> |
| </ul> |
| |
| |
| <ol id="breadcrumbs"> |
| |
| |
| <li class="first" > |
| <span><a href="javascript:if(confirm(%27http://10.20.160.198/wiki/dashboard.action \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/dashboard.action%27" tppabs="http://10.20.160.198/wiki/dashboard.action" title="Go to Dashboard">Dashboard</a></span> |
| </li> |
| |
| |
| <li> |
| <span><a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/dubbo%27" tppabs="http://10.20.160.198/wiki/display/dubbo">Dubbo</a></span> |
| </li> |
| <li id="ellipsis" title="Show all breadcrumbs"><span><strong>…</strong></span></li> |
| |
| |
| <li class="hidden-crumb" > |
| <span><a href="Home-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Home-zh">Home-zh</a></span> |
| </li> |
| |
| |
| <li> |
| <span><a href="Developer+Guide-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Developer+Guide-zh">Developer Guide-zh</a></span> |
| </li> |
| |
| |
| <li> |
| <span>SPI Reference-zh</span> |
| </li> |
| </ol> |
| |
| </div><!-- \#header --> |
| |
| <div id="main" > |
| |
| |
| <div id="navigation" class="content-navigation view" style="display: none"> |
| <fieldset class="hidden parameters"> |
| <input type="hidden" id="pageId" value="6947814"> |
| </fieldset> |
| <ul class="ajs-menu-bar"> |
| |
| <li class="normal ajs-menu-item"> |
| <a id="add-menu-link" class="add trigger ajs-menu-title" href="#"><span><span>Add</span></span></a> <div class="assistive ajs-drop-down"> |
| <ul id="add-menu-link-page" class="section-page first"> |
| <li> |
| |
| |
| |
| <a id="add-comment-menu-link" href="SPI+Reference-zh-showComments=true&showCommentArea=true.htm#addcomment" tppabs="http://10.20.160.198/wiki/display/dubbo/SPI+Reference-zh?showComments=true&showCommentArea=true#addcomment" class="add-comment" title="Add a Comment"> |
| <span>Comment</span></a> </li> |
| </ul> |
| </div> |
| </li> |
| |
| <li class="normal ajs-menu-item"> |
| <a id="action-menu-link" class="action trigger ajs-menu-title" href="#"><span><span>Tools</span></span></a> <div class="assistive ajs-drop-down"> |
| <ul id="action-menu-link-primary" class="section-primary first"> |
| <li> |
| |
| |
| |
| <a id="view-attachments-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewpageattachments.action?pageId=6947814" class="action-view-attachments" accessKey="a" title="View Attachments"> |
| <span><u>A</u>ttachments (0)</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="action-view-history-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewpreviousversions.action?pageId=6947814" class="action-view-history" title=""> |
| <span>Page History</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="action-page-permissions-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814" class="action-page-permissions" title="Edit restrictions"> |
| <span>Restrictions</span></a> </li> |
| </ul> |
| <ul id="action-menu-link-secondary" class="section-secondary"> |
| <li> |
| |
| |
| |
| <a id="view-page-info-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814" class="action-view-info" title=""> |
| <span>Info</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="link-to-page-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewinfo.action?pageId=6947814" class="" title="Link to this Page"> |
| <span>Link to this Page…</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="view-in-hierarchy-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814#selectedPageInHierarchy%27" tppabs="http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814#selectedPageInHierarchy" class="" title=""> |
| <span>View in Hierarchy</span></a> </li> |
| <li> |
| |
| |
| |
| <a id="action-view-source-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6947814%27" tppabs="http://10.20.160.198/wiki/pages/viewpagesrc.action?pageId=6947814" class="action-view-source popup-link" title=""> |
| <span>View Wiki Markup</span></a> </li> |
| </ul> |
| </div> |
| </li> |
| </ul> |
| </div> |
| |
| |
| <h1 id="title-heading" class="pagetitle" style="display: none"> |
| <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/dubbo \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/dubbo%27" tppabs="http://10.20.160.198/wiki/display/dubbo"><img class="logo space custom" src="dubbo-version=5&modificationDate=1320723683000.jpg" tppabs="http://10.20.160.198/wiki/download/attachments/6324241/dubbo?version=5&modificationDate=1320723683000" alt=""></a> |
| |
| </h1> |
| |
| |
| |
| <div id="content" class="page view"> |
| |
| |
| |
| |
| <div id="link-to-page-fields" class="hidden parameters"> |
| <input type="hidden" id="linkToThisPageHeading" value="Link to this Page"> |
| <input type="hidden" id="linkToThisPageLink" value="Link"> |
| <input type="hidden" id="linkToThisPageTinyLink" value="Tiny Link"> |
| <input type="hidden" id="linkToThisPageWikiMarkup" value="Wiki Markup"> |
| <input type="hidden" id="linkToThisPageClose" value="Close"> |
| </div> |
| <fieldset class="hidden parameters"> |
| <input type="hidden" title="movePageDialogViewPageTitle" value="Move Page – ‘SPI Reference-zh’"> |
| <input type="hidden" title="movePageDialogEditPageTitle" value="Set Page Location"> |
| <input type="hidden" title="movePageDialogMoveButton" value="Move"> |
| <input type="hidden" title="movePageDialogCancelButton" value="Cancel"> |
| <input type="hidden" title="movePageDialogBrowsePanelTip" value="Click to select the new parent page for this page and its children."> |
| <input type="hidden" title="movePageDialogSearchPanel" value="Search"> |
| <input type="hidden" title="movePageDialogHistoryPanel" value="Recently Viewed"> |
| <input type="hidden" title="movePageDialogHistoryNoResults" value="There were no recently viewed pages found."> |
| <input type="hidden" title="movePageDialogLocationPanel" value="Known Location"> |
| <input type="hidden" title="movePageDialogLocationNotFound" value="The specified page was not found."> |
| <input type="hidden" title="movePageDialogBrowsePanel" value="Browse"> |
| <input type="hidden" title="movePageDialogPanelLoadErrorMsg" value="Error reading the panel content from the server."> |
| <input type="hidden" title="movePageDialogPanelLoadErrorTip" value="You could try reloading the page and launching the dialog again."> |
| <input type="hidden" title="movePageDialogPanelLoadErrorStatus" value="HTTP Status"> |
| <input type="hidden" title="movePageDialogNoSelectionErrorMsg" value="You must make a selection in the tree before you can move the page."> |
| <input type="hidden" title="movePageDialogSearchError" value="Failed to retrieve search results from the server."> |
| <input type="hidden" title="movePageDialogSearchNoResults" value="There were no pages found containing <b>{0}</b>."> |
| <input type="hidden" title="movePageDialogSearchResultCount" value="Showing <b>{0}</b>-<b>{1}</b> of <b>{2}</b> pages containing <b>{3}</b>."> |
| <input type="hidden" title="movePageDialogMoveFailed" value="Move failed. There was a problem contacting the server."> |
| <input type="hidden" title="movePageDialogCannotChangeSpace" value="You cannot move this page to another space because you do not have permission to remove it from this space."> |
| <input type="hidden" title="pageTitle" value="SPI Reference-zh"/> |
| <input type="hidden" title="parentPageTitle" value="Developer Guide-zh"/> |
| <input type="hidden" title="fromPageTitle" value=""/> |
| <input type="hidden" title="spaceKey" value="dubbo"/> |
| <input type="hidden" title="spaceName" value="Dubbo"/> |
| <input type="hidden" title="movePageDialogInvalidLocation" value="You cannot move a page to be underneath itself or its children."/> |
| <input type="hidden" title="movePageDialogOrderingTitle" value="Page Ordering"/> |
| <input type="hidden" title="movePageDialogBackButton" value="Back"/> |
| <input type="hidden" title="movePageDialogMoveAndOrderButton" value="Reorder"/> |
| <input type="hidden" title="movePageDialogNextButton" value="Move"/> |
| </fieldset> |
| |
| <script type="text/x-template" title="movePageDialog"> |
| <div class="row information"> |
| <div class="inner"> |
| <div class="element"> |
| Specify the new parent page for this page and its children by space and title. |
| </div> |
| </div> |
| </div> |
| <div class="form"> |
| <fieldset> |
| |
| |
| <legend class="assistive"><span>Change the Parent Page to a Known Page</span></legend> |
| <div class="row"> |
| <label for="new-space">New space:</label> |
| <div class="value new-space-value"> |
| <input id="new-space-key" name="new-space-key" type="hidden" value="dubbo"> |
| <span class="space-input"> |
| <input id="new-space" name="new-space" value="Dubbo" disabled="disabled"> |
| </span> |
| <span class="description warning">You cannot move this page to another space because you do not have permission to remove it from this space.</span> |
| <div class="new-space-dropdown aui-dd-parent autocomplete"></div> |
| </div> |
| </div> |
| <div class="row"> |
| <label for="new-parent-page">New parent page:</label> |
| <div class="value new-parent-page-value"> |
| <span class="page-input"> |
| <input id="new-parent-page" name="new-parent-page" value="Developer Guide-zh"> |
| </span> |
| <span class="description">Start typing a page title to see a list of suggestions.</span> |
| <div class="new-parent-page-dropdown aui-dd-parent autocomplete"></div> |
| </div> |
| </div> |
| </fieldset> |
| </div> |
| <div class="location-info"> |
| <div class="row"> |
| <label>Current location:</label> |
| <div class="value breadcrumbs-container"> |
| <div class="breadcrumbs-line"> |
| <ul id="current-parent-breadcrumbs" class="breadcrumbs"> |
| </ul> |
| </div> |
| </div> |
| </div> |
| <div class="row"> |
| <label>New location:</label> |
| <div class="value breadcrumbs-container"> |
| <div class="breadcrumbs-line"> |
| <ul id="new-parent-breadcrumbs" class="breadcrumbs"> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| </script> |
| <script type="text/x-template" title="movePageErrors"> |
| <div id="move-errors" class="hidden warning"></div> |
| </script> |
| <script type="text/x-template" title="movePageBreadcrumb"> |
| <li><a class="{2}" title="{3}" tabindex="-1"><span>{0}</span></a></li> |
| </script> |
| <script type="text/x-template" title="movePageBreadcrumbLoading"> |
| <li class="loading"><span>Loading breadcrumbs…</span></li> |
| </script> |
| <script type="text/x-template" title="movePageBreadcrumbError"> |
| <li class="warning last"><span>Error retrieving breadcrumbs.</span></li> |
| </script> |
| <script type="text/x-template" title="movePageNoMatchingPages"> |
| <ol><li><span class="warning">No matching pages found.</span></li></ol> |
| </script> |
| <script type="text/x-template" title="movePageNoMatchingSpaces"> |
| <ol><li><span class="warning">No matching spaces found.</span></li></ol> |
| </script> |
| |
| <script type="text/x-template" title="movePageSearchPanel"> |
| <div class="row information"> |
| <div class="inner"> |
| <div class="element"> |
| Search for and select the new parent page for this page and its children. |
| </div> |
| </div> |
| </div> |
| <div id="move-page-search-container" class="row"> |
| <div class="search-form"> |
| <fieldset> |
| |
| |
| <legend class="assistive"><span>Search for a New Parent Page</span></legend> |
| |
| |
| <label for="move-page-search-query" class="assistive">Search keywords</label> |
| <input class="search-query" id="move-page-search-query"> |
| |
| |
| <label for="move-page-search-space" class="assistive">Search in space</label> |
| <select id="move-page-search-space" class="search-space" disabled="disabled"> |
| <option value="dubbo" selected="selected">Dubbo</option> |
| </select> |
| <input type="button" value="Search"> |
| <div class="description warning">You cannot move this page to another space because you do not have permission to remove it from this space.</div> |
| </fieldset> |
| </div> |
| <div class="search-results"> |
| </div> |
| </div> |
| </script> |
| <script type="text/x-template" title="movePageSearchResultsLoading"> |
| <div class="searching">Searching…</div> |
| </script> |
| |
| <script type="text/x-template" title="movePageHistoryPanel"> |
| <div class="row information"> |
| <div class="inner"> |
| <div class="element"> |
| Select the new parent page for this page and its children from your history. |
| </div> |
| </div> |
| </div> |
| <div id="move-page-search-container" class="row"> |
| <div class="search-results"> |
| </div> |
| </div> |
| </script> |
| <script type="text/x-template" title="movePageHistoryLoading"> |
| <div class="searching">Loading…</div> |
| </script> |
| <script type="text/x-template" title="movePageBrowsePanel"> |
| <div class="row information"> |
| <div class="inner"> |
| <div class="element"> |
| Click to select the new parent page for this page and its children. |
| </div> |
| </div> |
| </div> |
| <div class="tree"></div> |
| </script> |
| <script type="text/x-template" title="movePagePanelLoading"> |
| <span>Loading…</span> |
| </script> |
| <script type="text/x-template" title="movePageBrowsePanelSpace"> |
| <ul><li id='tree-root-node-item' class='root-node-list-item'><a class='root-node' href='#'>{0}</a></li></ul> |
| </script> |
| <script type="text/x-template" title="orderingPagePanel"> |
| <div id="orderingPlaceHolder"></div> |
| </script> |
| <script type="text/x-template" title="reorderCheckbox"> |
| <span id="reorderRequirement"><input id="reorderCheck" type="checkbox" name="reorderFlag" title="Choose the position of this page within the list of child pages."/><label for="reorderCheck" title="Choose the position of this page within the list of child pages.">Reorder</label></span> |
| </script> |
| <script type="text/x-template" title="move-help-link"> |
| <div class="dialog-help-link"> |
| <a href="http://docs.atlassian.com/confluence/docs-35/Moving+a+Page" target="_blank">Help</a> |
| </div> |
| </script> |
| <script type="text/x-template" title="searchResultsGrid"> |
| <table> |
| <thead> |
| <tr class="header"> |
| <th class="search-result-title">Page Title</th> |
| <th class="search-result-space">Space</th> |
| <th class="search-result-date">Updated</th> |
| </tr> |
| </thead> |
| </table> |
| </script> |
| <script type="text/x-template" title="searchResultsGridCount"> |
| <p class="search-result-count">{0}</p> |
| </script> |
| <script type="text/x-template" title="searchResultsGridRow"> |
| <tr class="search-result"> |
| <th class="search-result-title"><a href="{1}" class="content-type-{2}"><span>{0}</span></a></th> |
| <td class="search-result-space"><a class="space" href="http://10.20.160.198/wiki/display/{4}/" title="{3}">{3}</a></td> |
| <td class="search-result-date"><span class="date" title="{6}">{5}</span></td> |
| </tr> |
| </script> |
| <!-- Start restrictions section --> |
| <script type="text/x-template" title="page-permissions-div"> |
| <div id="page-permissions-div"> |
| <div id="page-permissions-editor-form"> |
| |
| <div id="page-permissions-error-div" class="hidden"> |
| <a href="#" id="permissions-error-div-close">Ok</a> |
| <div></div> |
| </div> |
| |
| <div id="page-permissions-type-radios" class="page-permissions-label-rows"> |
| <div> |
| <input id="restrictViewRadio" type="radio" checked="checked" name="pagePermissionTypeRadio" value="view"/> |
| <label for="restrictViewRadio">Restrict viewing of this page</label> |
| <input id="restrictEditRadio" type="radio" name="pagePermissionTypeRadio" value="edit"/> |
| <label for="restrictEditRadio">Restrict editing of this page</label> |
| </div> |
| </div> |
| <div id="page-permissions-input" class="page-permissions-label-rows"> |
| <div class="page-permissions-label">To:</div> |
| <div id="page-permissions-chooser-box"> |
| <span id="page-permissions-choose-user" class="ajs-button"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="#" id='userpicker-popup-link-image' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/openuserpicker.action?key=dubbo&startIndex=0&onPopupSubmit=AJS.PagePermissions.addUserPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=700,height=680,scrollbars=yes'); picker.focus(); return false;"><img src="user_16.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/icons/user_16.gif*/ height=16 width=16 border=0 align="absmiddle" title="Choose users" /></a> |
| <a href="#" id='userpicker-popup-link-text' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/openuserpicker.action?key=dubbo&startIndex=0&onPopupSubmit=AJS.PagePermissions.addUserPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=700,height=680,scrollbars=yes'); picker.focus(); return false;">Person...</a> |
| |
| |
| </span> |
| <span id="page-permissions-choose-group" class="ajs-button"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="#" id='grouppicker-popup-link-image' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/opengrouppicker.action?key=dubbo&startIndex=0&actionName=dosearchgroups.action&onPopupSubmit=AJS.PagePermissions.addGroupPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=550,scrollbars=yes'); picker.focus(); return false;"><img src="group_16.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/icons/group_16.gif*/ height=16 width=16 border=0 align="absmiddle" title="Choose groups" /></a> |
| <a href="#" id='grouppicker-popup-link-text' onClick="var picker = window.open('http://10.20.160.198/wiki/spaces/opengrouppicker.action?key=dubbo&startIndex=0&actionName=dosearchgroups.action&onPopupSubmit=AJS.PagePermissions.addGroupPermissions', 'EntitiesPicker', 'status=yes,resizable=yes,top=100,left=200,width=580,height=550,scrollbars=yes'); picker.focus(); return false;">Group...</a> |
| |
| |
| </span> |
| </div> |
| <div id="page-permissions-input-box"> |
| <span> |
| <input type="text" id="page-permissions-names-input" class="input-placeholder" value="Enter user or group name" name="permissionNames" size="30" autocomplete="off"/> |
| </span> |
| <input |
| type="hidden" |
| id="page-permissions-names-hidden" /> <img height="16px" width="1px" src="spacer.gif"/*tpa=http://10.20.160.198/wiki/s/en/2166/34/_/images/border/spacer.gif*//> |
| <input type="button" id="add-typed-names" value="Restrict"> |
| </div> |
| </div> |
| </div> |
| <div id="page-permissions-tables"> |
| <div id="page-permissions-table-div"> |
| <table id="page-permissions-table" class="page-permissions-table"> |
| <tr id="page-permissions-no-views" class="marker-row"> |
| <td colspan="3" class="page-permissions-marker-cell"><span>No view restrictions are defined for this page</span></td> |
| </tr> |
| <tr id="page-permissions-no-edits" class="marker-row"> |
| <td colspan="3" class="page-permissions-marker-cell"><span>No edit restrictions are defined for this page</span></td> |
| </tr> |
| </table> |
| </div> |
| <div id="page-inherited-permissions-table-div" class="hidden"> |
| <span id="page-inherited-permissions-table-desc"> |
| <a class="icon twisty-closed">Show/Hide</a> |
| <a id="toggle-inherited-permissions" title="Click to see inherited restrictions">This page has restricted parent pages. It can only be seen by users who can see those parent pages.</a> |
| </span> |
| <div id="page-inherited-permissions-tables" class="hidden page-inheritance-togglable"></div> |
| </div> |
| </div> |
| </div> |
| </script> |
| |
| <script type="text/x-template" title="permissions-row-template"> |
| <tr class="permission-row"> |
| |
| <td class="page-permissions-marker-cell" width="20%"> |
| <span>Viewing restricted to:</span> |
| </td> |
| <td class="permission-entity" nowrap="true" width="40%"> |
| <span class="entity-container"> |
| <img class="permission-entity-picture"/> |
| <span class="permission-entity-display-name"></span> |
| <span class="permission-entity-name-wrap"> (<span class="permission-entity-name"></span>)</span> |
| </span> |
| </td> |
| <td class="permission-detail-column"> |
| <div class="permission-remove-div"> |
| <a href="#" class="remove-permission-link">Remove restriction</a> |
| </div> |
| </td> |
| </tr> |
| </script> |
| <script type="text/x-template" title="permissions-username-no-suggestion-template"> |
| <ol> |
| <li><a href="#" class="message"><span>No matches</span></a></li> |
| </ol> |
| </script> |
| <script type="text/x-template" title="page-inherited-permissions-table-div-template"> |
| <div class="page-inherited-permissions-owner-div"> |
| <div class="page-inherited-permissions-table-desc">Viewing restrictions apply to “<a></a>”. In order to see “<span></span>”, a user must be in the following list of users and groups:</div> |
| <table class="page-permissions-table"></table> |
| </div> |
| </script> |
| <script type="text/x-template" title="page-restrictions-help-link"> |
| <div class="dialog-help-link"> |
| <a href="http://docs.atlassian.com/confluence/docs-35/Page+Restrictions" target="_blank">Help</a> |
| </div> |
| </script> |
| <!-- End restrictions section --> |
| |
| <fieldset class="hidden parameters"> |
| <input type="hidden" title="spaceKeyEncoded" value="dubbo"> |
| <input type="hidden" title="spaceKeyDecoded" value="dubbo"> |
| </fieldset> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a href="#page-metadata-end" class="assistive">Skip to end of metadata</a> |
| <div id="page-metadata-start" class="assistive"></div> |
| |
| <div class="page-metadata"> |
| <ul> |
| <li class="page-metadata-item noprint"> |
| |
| |
| |
| <a id="content-metadata-page-restrictions" href="#" class="page-metadata-icon page-restrictions hidden" title="Page restrictions apply. Click the lock icon to view or edit the restriction."> |
| <span>Page restrictions apply</span></a> </li> |
| <li class="page-metadata-modification-info" style="display: none"> |
| Added by <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/~william.liangf \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/~william.liangf%27" tppabs="http://10.20.160.198/wiki/display/~william.liangf" |
| class="url fn confluence-userlink" data-username="william.liangf" |
| >梁 飞</a>, last edited by <a href="javascript:if(confirm(%27http://10.20.160.198/wiki/display/~william.liangf \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/display/~william.liangf%27" tppabs="http://10.20.160.198/wiki/display/~william.liangf" |
| class="url fn confluence-userlink" data-username="william.liangf" |
| >梁 飞</a> on 八月 29, 2012 |
| <span class="noprint"> (<a id="view-change-link" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/diffpages.action?pageId=6947814&originalId=7673900 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/diffpages.action?pageId=6947814&originalId=7673900%27" tppabs="http://10.20.160.198/wiki/pages/diffpages.action?pageId=6947814&originalId=7673900">view change</a>)</span> |
| </li> |
| </ul> |
| <div id="version-comment" class="noteMacro" style="display: none;"> |
| <strong>Comment:</strong> |
| <br /> |
| </div> |
| </div> |
| |
| |
| <a href="#page-metadata-start" class="assistive">Go to start of metadata</a> |
| <div id="page-metadata-end" class="assistive"></div> |
| |
| <fieldset class="hidden parameters"> |
| <input type="hidden" title="browsePageTreeMode" value="view"> |
| <input type="hidden" title="parentPageId" value="6948815"> |
| </fieldset> |
| |
| <div class="wiki-content"> |
| <!-- wiki content --> |
| <h2><a name="SPIReference-zh-SPI%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C"></a>SPI参考手册</h2> |
| <p>(<a href="SPI+Reference-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/SPI+Reference-zh" title="SPI Reference-zh">+</a>) (<a href="#SPIReference-zh-SPI%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C">#</a>)</p> |
| |
| <div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="warning-3.gif" tppabs="http://10.20.160.198/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>SPI使用范围</b><br />扩展接口仅用于系统集成,或Contributor扩展功能插件。</td></tr></table></div> |
| |
| <h3><a name="SPIReference-zh-%E5%8D%8F%E8%AE%AE%E6%89%A9%E5%B1%95"></a>协议扩展</h3> |
| <p>(<a href="Protocol+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Protocol+SPI-zh" title="Protocol SPI-zh">+</a>) (<span class="error">[#]</span>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>RPC协议扩展,封装远程调用细节。</p> |
| |
| <p>契约:</p> |
| <ul> |
| <li>当用户调用refer()所返回的Invoker对象的invoke()方法时,协议需相应执行同URL远端export()传入的Invoker对象的invoke()方法。</li> |
| <li>其中,refer()返回的Invoker由协议实现,协议通常需要在此Invoker中发送远程请求,export()传入的Invoker由框架实现并传入,协议不需要关心。</li> |
| </ul> |
| |
| |
| <p>注意:</p> |
| <ul> |
| <li>协议不关心业务接口的透明代理,以Invoker为中心,由外层将Invoker转换为业务接口。</li> |
| <li>协议不一定要是TCP网络通讯,比如通过共享文件,IPC进程间通讯等。</li> |
| </ul> |
| |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.Protocol |
| com.alibaba.dubbo.rpc.Exporter |
| com.alibaba.dubbo.rpc.Invoker]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[public interface Protocol { |
| |
| /** |
| * 暴露远程服务:<br> |
| * 1. 协议在接收请求时,应记录请求来源方地址信息:RpcContext.getContext().setRemoteAddress();<br> |
| * 2. export()必须是幂等的,也就是暴露同一个URL的Invoker两次,和暴露一次没有区别。<br> |
| * 3. export()传入的Invoker由框架实现并传入,协议不需要关心。<br> |
| * |
| * @param <T> 服务的类型 |
| * @param invoker 服务的执行体 |
| * @return exporter 暴露服务的引用,用于取消暴露 |
| * @throws RpcException 当暴露服务出错时抛出,比如端口已占用 |
| */ |
| <T> Exporter<T> export(Invoker<T> invoker) throws RpcException; |
| |
| /** |
| * 引用远程服务:<br> |
| * 1. 当用户调用refer()所返回的Invoker对象的invoke()方法时,协议需相应执行同URL远端export()传入的Invoker对象的invoke()方法。<br> |
| * 2. refer()返回的Invoker由协议实现,协议通常需要在此Invoker中发送远程请求。<br> |
| * 3. 当url中有设置check=false时,连接失败不能抛出异常,需内部自动恢复。<br> |
| * |
| * @param <T> 服务的类型 |
| * @param type 服务的类型 |
| * @param url 远程服务的URL地址 |
| * @return invoker 服务的本地代理 |
| * @throws RpcException 当连接服务提供方失败时抛出 |
| */ |
| <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException; |
| |
| }]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol id="xxx1" name="xxx" /> <!-- 声明协议,如果没有配置id,将以name为id --> |
| <dubbo:service protocol="xxx1" /> <!-- 引用协议,如果没有配置protocol属性,将在ApplicationContext中自动扫描protocol配置 --> |
| <dubbo:provider protocol="xxx1" /> <!-- 引用协议缺省值,当<dubbo:service>没有配置prototol属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.injvm.InjvmProtocol |
| com.alibaba.dubbo.rpc.dubbo.DubboProtocol |
| com.alibaba.dubbo.rpc.rmi.RmiProtocol |
| com.alibaba.dubbo.rpc.http.HttpProtocol |
| com.alibaba.dubbo.rpc.http.hessian.HessianProtocol]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxProtocol.java (实现Protocol接口) |
| |-XxxExporter.java (实现Exporter接口) |
| |-XxxInvoker.java (实现Invoker接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.Protocol (纯文本文件,内容为:xxx=com.xxx.XxxProtocol)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxProtocol.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.Protocol; |
| |
| public class XxxProtocol implements Protocol { |
| public <T> Exporter<T> export(Invoker<T> invoker) throws RpcException { |
| return new XxxExporter(invoker); |
| } |
| public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException { |
| return new XxxInvoker(type, url); |
| } |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExporter.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.support.AbstractExporter; |
| |
| public class XxxExporter<T> extends AbstractExporter<T> { |
| public XxxExporter(Invoker<T> invoker) throws RemotingException{ |
| super(invoker); |
| // ... |
| } |
| public void unexport() { |
| super.unexport(); |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxInvoker.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.support.AbstractInvoker; |
| |
| public class XxxInvoker<T> extends AbstractInvoker<T> { |
| public XxxInvoker(Class<T> type, URL url) throws RemotingException{ |
| super(type, url); |
| } |
| protected abstract Object doInvoke(Invocation invocation) throws Throwable { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxProtocol]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E8%B0%83%E7%94%A8%E6%8B%A6%E6%88%AA%E6%89%A9%E5%B1%95"></a>调用拦截扩展</h3> |
| <p>(<a href="Filter+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Filter+SPI-zh" title="Filter SPI-zh">+</a>) (<a href="#SPIReference-zh-%E8%B0%83%E7%94%A8%E6%8B%A6%E6%88%AA%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E"></a>(1) 扩展说明</h4> |
| |
| <p>服务提供方和服务消费方调用过程拦截,Dubbo本身的大多功能均基于此扩展点实现,每次远程方法执行,该拦截都会被执行,请注意对性能的影响。<br/> |
| 约定:</p> |
| <ul> |
| <li>用户自定义filter默认在内置filter之后。</li> |
| <li>特殊值default,表示缺省扩展点插入的位置。 |
| <ul> |
| <li>比如:filter="xxx,default,yyy",表示xxx在缺省filter之前,yyy在缺省filter之后。</li> |
| </ul> |
| </li> |
| <li>特殊符号-,表示剔除。 |
| <ul> |
| <li>比如:filter="-foo1",剔除添加缺省扩展点foo1。</li> |
| <li>比如:filter="-default",剔除添加所有缺省扩展点。</li> |
| </ul> |
| </li> |
| <li>provider和service同时配置的filter时,累加所有filter,而不是覆盖。 |
| <ul> |
| <li>比如:<dubbo:provider filter="xxx,yyy"/>和<dubbo:service filter="aaa,bbb" />,则xxx,yyy,aaa,bbb均会生效。</li> |
| <li>如果要覆盖,需配置:<dubbo:service filter="-xxx,-yyy,aaa,bbb" /></li> |
| </ul> |
| </li> |
| </ul> |
| |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.Filter]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:reference filter="xxx,yyy" /> <!-- 消费方调用过程拦截 --> |
| <dubbo:consumer filter="xxx,yyy"/> <!-- 消费方调用过程缺省拦截器,将拦截所有reference --> |
| <dubbo:service filter="xxx,yyy" /> <!-- 提供方调用过程拦截 --> |
| <dubbo:provider filter="xxx,yyy"/> <!-- 提供方调用过程缺省拦截器,将拦截所有service -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.filter.EchoFilter |
| com.alibaba.dubbo.rpc.filter.GenericFilter |
| com.alibaba.dubbo.rpc.filter.GenericImplFilter |
| com.alibaba.dubbo.rpc.filter.TokenFilter |
| com.alibaba.dubbo.rpc.filter.AccessLogFilter |
| com.alibaba.dubbo.rpc.filter.CountFilter |
| com.alibaba.dubbo.rpc.filter.ActiveLimitFilter |
| com.alibaba.dubbo.rpc.filter.ClassLoaderFilter |
| com.alibaba.dubbo.rpc.filter.ContextFilter |
| com.alibaba.dubbo.rpc.filter.ConsumerContextFilter |
| com.alibaba.dubbo.rpc.filter.ExceptionFilter |
| com.alibaba.dubbo.rpc.filter.ExecuteLimitFilter |
| com.alibaba.dubbo.rpc.filter.DeprecatedFilter]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxFilter.java (实现Filter接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.Filter (纯文本文件,内容为:xxx=com.xxx.XxxFilter)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxFilter.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.Filter; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.Invocation; |
| import com.alibaba.dubbo.rpc.Result; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxFilter implements Filter { |
| public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException { |
| // before filter ... |
| Result result = invoker.invoke(invocation); |
| // after filter ... |
| return result; |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.Filter</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxFilter]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E5%BC%95%E7%94%A8%E7%9B%91%E5%90%AC%E6%89%A9%E5%B1%95"></a>引用监听扩展</h3> |
| <p>(<a href="InvokerListener+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/InvokerListener+SPI-zh" title="InvokerListener SPI-zh">+</a>) (<a href="#SPIReference-zh-%E5%BC%95%E7%94%A8%E7%9B%91%E5%90%AC%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>当有服务引用时,触发该事件。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.InvokerListener]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:reference listener="xxx,yyy" /> <!-- 引用服务监听 --> |
| <dubbo:consumer listener="xxx,yyy" /> <!-- 引用服务缺省监听器 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.listener.DeprecatedInvokerListener]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxInvokerListener.java (实现InvokerListener接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.InvokerListener (纯文本文件,内容为:xxx=com.xxx.XxxInvokerListener)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxInvokerListener.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.InvokerListener; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxInvokerListener implements InvokerListener { |
| public void referred(Invoker<?> invoker) throws RpcException { |
| // ... |
| } |
| public void destroyed(Invoker<?> invoker) throws RpcException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.InvokerListener</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxInvokerListener]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E6%9A%B4%E9%9C%B2%E7%9B%91%E5%90%AC%E6%89%A9%E5%B1%95"></a>暴露监听扩展</h3> |
| <p>(<a href="ExporterListener+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/ExporterListener+SPI-zh" title="ExporterListener SPI-zh">+</a>) (<a href="#SPIReference-zh-%E6%9A%B4%E9%9C%B2%E7%9B%91%E5%90%AC%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>当有服务暴露时,触发该事件。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.ExporterListener]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:service listener="xxx,yyy" /> <!-- 暴露服务监听 --> |
| <dubbo:provider listener="xxx,yyy" /> <!-- 暴露服务缺省监听器 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.registry.directory.RegistryExporterListener]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxExporterListener.java (实现ExporterListener接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.ExporterListener (纯文本文件,内容为:xxx=com.xxx.XxxExporterListener)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExporterListener.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.ExporterListener; |
| import com.alibaba.dubbo.rpc.Exporter; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxExporterListener implements ExporterListener { |
| public void exported(Exporter<?> exporter) throws RpcException { |
| // ... |
| } |
| public void unexported(Exporter<?> exporter) throws RpcException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.ExporterListener</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxExporterListener]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E9%9B%86%E7%BE%A4%E6%89%A9%E5%B1%95"></a>集群扩展</h3> |
| <p>(<a href="Cluster+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Cluster+SPI-zh" title="Cluster SPI-zh">+</a>) (<a href="#SPIReference-zh-%E9%9B%86%E7%BE%A4%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>当有多个服务提供方时,将多个服务提供方组织成一个集群,并伪装成一个提供方。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.Cluster]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol cluster="xxx" /> |
| <dubbo:provider cluster="xxx" /> <!-- 缺省值配置,如果<dubbo:protocol>没有配置cluster时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.support.FailoverCluster |
| com.alibaba.dubbo.rpc.cluster.support.FailfastCluster |
| com.alibaba.dubbo.rpc.cluster.support.FailsafeCluster |
| com.alibaba.dubbo.rpc.cluster.support.FailbackCluster |
| com.alibaba.dubbo.rpc.cluster.support.ForkingCluster |
| com.alibaba.dubbo.rpc.cluster.support.AvailableCluster]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxCluster.java (实现Cluster接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.cluster.Cluster (纯文本文件,内容为:xxx=com.xxx.XxxCluster)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxCluster.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.cluster.Cluster; |
| import com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker; |
| import com.alibaba.dubbo.rpc.cluster.Directory; |
| import com.alibaba.dubbo.rpc.cluster.LoadBalance; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.Invocation; |
| import com.alibaba.dubbo.rpc.Result; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxCluster implements Cluster { |
| public <T> Invoker<T> merge(Directory<T> directory) throws RpcException { |
| return new AbstractClusterInvoker<T>(directory) { |
| public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException { |
| // ... |
| } |
| }; |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.Cluster</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxCluster]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E8%B7%AF%E7%94%B1%E6%89%A9%E5%B1%95"></a>路由扩展</h3> |
| <p>(<a href="RouterFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/RouterFactory+SPI-zh" title="RouterFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E8%B7%AF%E7%94%B1%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>从多个服务提者方中选择一个进行调用。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.RouterFactory |
| com.alibaba.dubbo.rpc.cluster.Router]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol router="xxx" /> |
| <dubbo:provider router="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置loadbalance时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.router.ScriptRouterFactory |
| com.alibaba.dubbo.rpc.cluster.router.FileRouterFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxRouterFactory.java (实现LoadBalance接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.cluster.RouterFactory (纯文本文件,内容为:xxx=com.xxx.XxxRouterFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxRouterFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.cluster.RouterFactory; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.Invocation; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxRouterFactory implements RouterFactory { |
| public <T> List<Invoker<T>> select(List<Invoker<T>> invokers, Invocation invocation) throws RpcException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.RouterFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxRouterFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%E6%89%A9%E5%B1%95"></a>负载均衡扩展</h3> |
| <p>(<a href="LoadBalance+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/LoadBalance+SPI-zh" title="LoadBalance SPI-zh">+</a>) (<a href="#SPIReference-zh-%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>从多个服务提者方中选择一个进行调用。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.LoadBalance]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol loadbalance="xxx" /> |
| <dubbo:provider loadbalance="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置loadbalance时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance |
| com.alibaba.dubbo.rpc.cluster.loadbalance.RoundRobinLoadBalance |
| com.alibaba.dubbo.rpc.cluster.loadbalance.LeastActiveLoadBalance]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxLoadBalance.java (实现LoadBalance接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.cluster.LoadBalance (纯文本文件,内容为:xxx=com.xxx.XxxLoadBalance)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxLoadBalance.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.cluster.LoadBalance; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.Invocation; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxLoadBalance implements LoadBalance { |
| public <T> Invoker<T> select(List<Invoker<T>> invokers, Invocation invocation) throws RpcException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.LoadBalance</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxLoadBalance]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E5%90%88%E5%B9%B6%E7%BB%93%E6%9E%9C%E6%89%A9%E5%B1%95"></a>合并结果扩展</h3> |
| <p>(<a href="Merger+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Merger+SPI-zh" title="Merger SPI-zh">+</a>) (<a href="#SPIReference-zh-%E5%90%88%E5%B9%B6%E7%BB%93%E6%9E%9C%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>合并返回结果,用于分组聚合。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.Merger]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:method merger="xxx" />]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.cluster.merger.ArrayMerger |
| com.alibaba.dubbo.rpc.cluster.merger.ListMerger |
| com.alibaba.dubbo.rpc.cluster.merger.SetMerger |
| com.alibaba.dubbo.rpc.cluster.merger.MapMerger]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxMerger.java (实现Merger接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.cluster.Merger (纯文本文件,内容为:xxx=com.xxx.XxxMerger)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxMerger.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.cluster.Merger; |
| |
| public class XxxMerger<T> implements Merger<T> { |
| public T merge(T... results) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.cluster.Merger</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxMerger]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83%E6%89%A9%E5%B1%95"></a>注册中心扩展</h3> |
| <p>(<a href="RegistryFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/RegistryFactory+SPI-zh" title="RegistryFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>负责服务的注册与发现。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.registry.RegistryFactory |
| com.alibaba.dubbo.registry.Registry]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:registry id="xxx1" address="xxx://ip:port" /> <!-- 定义注册中心 --> |
| <dubbo:service registry="xxx1" /> <!-- 引用注册中心,如果没有配置registry属性,将在ApplicationContext中自动扫描registry配置 --> |
| <dubbo:provider registry="xxx1" /> <!-- 引用注册中心缺省值,当<dubbo:service>没有配置registry属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E6%89%A9%E5%B1%95%E5%A5%91%E7%BA%A6%EF%BC%9A"></a>(4) 扩展契约:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>RegistryFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[public interface RegistryFactory { |
| |
| /** |
| * 连接注册中心. |
| * |
| * 连接注册中心需处理契约:<br> |
| * 1. 当设置check=false时表示不检查连接,否则在连接不上时抛出异常。<br> |
| * 2. 支持URL上的username:password权限认证。<br> |
| * 3. 支持backup=10.20.153.10备选注册中心集群地址。<br> |
| * 4. 支持file=registry.cache本地磁盘文件缓存。<br> |
| * 5. 支持timeout=1000请求超时设置。<br> |
| * 6. 支持session=60000会话超时或过期设置。<br> |
| * |
| * @param url 注册中心地址,不允许为空 |
| * @return 注册中心引用,总不返回空 |
| */ |
| Registry getRegistry(URL url); |
| |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>RegistryService.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[public interface RegistryService { // Registry extends RegistryService |
| |
| /** |
| * 注册服务. |
| * |
| * 注册需处理契约:<br> |
| * 1. 当URL设置了check=false时,注册失败后不报错,在后台定时重试,否则抛出异常。<br> |
| * 2. 当URL设置了dynamic=false参数,则需持久存储,否则,当注册者出现断电等情况异常退出时,需自动删除。<br> |
| * 3. 当URL设置了category=overrides时,表示分类存储,缺省类别为providers,可按分类部分通知数据。<br> |
| * 4. 当注册中心重启,网络抖动,不能丢失数据,包括断线自动删除数据。<br> |
| * 5. 允许URI相同但参数不同的URL并存,不能覆盖。<br> |
| * |
| * @param url 注册信息,不允许为空,如:dubbo://10.20.153.10/com.alibaba.foo.BarService?version=1.0.0&application=kylin |
| */ |
| void register(URL url); |
| |
| /** |
| * 取消注册服务. |
| * |
| * 取消注册需处理契约:<br> |
| * 1. 如果是dynamic=false的持久存储数据,找不到注册数据,则抛IllegalStateException,否则忽略。<br> |
| * 2. 按全URL匹配取消注册。<br> |
| * |
| * @param url 注册信息,不允许为空,如:dubbo://10.20.153.10/com.alibaba.foo.BarService?version=1.0.0&application=kylin |
| */ |
| void unregister(URL url); |
| |
| /** |
| * 订阅服务. |
| * |
| * 订阅需处理契约:<br> |
| * 1. 当URL设置了check=false时,订阅失败后不报错,在后台定时重试。<br> |
| * 2. 当URL设置了category=overrides,只通知指定分类的数据,多个分类用逗号分隔,并允许星号通配,表示订阅所有分类数据。<br> |
| * 3. 允许以interface,group,version,classifier作为条件查询,如:interface=com.alibaba.foo.BarService&version=1.0.0<br> |
| * 4. 并且查询条件允许星号通配,订阅所有接口的所有分组的所有版本,或:interface=*&group=*&version=*&classifier=*<br> |
| * 5. 当注册中心重启,网络抖动,需自动恢复订阅请求。<br> |
| * 6. 允许URI相同但参数不同的URL并存,不能覆盖。<br> |
| * 7. 必须阻塞订阅过程,等第一次通知完后再返回。<br> |
| * |
| * @param url 订阅条件,不允许为空,如:consumer://10.20.153.10/com.alibaba.foo.BarService?version=1.0.0&application=kylin |
| * @param listener 变更事件监听器,不允许为空 |
| */ |
| void subscribe(URL url, NotifyListener listener); |
| |
| /** |
| * 取消订阅服务. |
| * |
| * 取消订阅需处理契约:<br> |
| * 1. 如果没有订阅,直接忽略。<br> |
| * 2. 按全URL匹配取消订阅。<br> |
| * |
| * @param url 订阅条件,不允许为空,如:consumer://10.20.153.10/com.alibaba.foo.BarService?version=1.0.0&application=kylin |
| * @param listener 变更事件监听器,不允许为空 |
| */ |
| void unsubscribe(URL url, NotifyListener listener); |
| |
| /** |
| * 查询注册列表,与订阅的推模式相对应,这里为拉模式,只返回一次结果。 |
| * |
| * @see com.alibaba.dubbo.registry.NotifyListener#notify(List) |
| * @param url 查询条件,不允许为空,如:consumer://10.20.153.10/com.alibaba.foo.BarService?version=1.0.0&application=kylin |
| * @return 已注册信息列表,可能为空,含义同{@link com.alibaba.dubbo.registry.NotifyListener#notify(List<URL>)}的参数。 |
| */ |
| List<URL> lookup(URL url); |
| |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>NotifyListener.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[public interface NotifyListener { |
| |
| /** |
| * 当收到服务变更通知时触发。 |
| * |
| * 通知需处理契约:<br> |
| * 1. 总是以服务接口和数据类型为维度全量通知,即不会通知一个服务的同类型的部分数据,用户不需要对比上一次通知结果。<br> |
| * 2. 订阅时的第一次通知,必须是一个服务的所有类型数据的全量通知。<br> |
| * 3. 中途变更时,允许不同类型的数据分开通知,比如:providers, consumers, routes, overrides,允许只通知其中一种类型,但该类型的数据必须是全量的,不是增量的。<br> |
| * 4. 如果一种类型的数据为空,需通知一个empty协议并带category参数的标识性URL数据。<br> |
| * 5. 通知者(即注册中心实现)需保证通知的顺序,比如:单线程推送,队列串行化,带版本对比。<br> |
| * |
| * @param urls 已注册信息列表,总不为空,含义同{@link com.alibaba.dubbo.registry.RegistryService#lookup(URL)}的返回值。 |
| */ |
| void notify(List<URL> urls); |
| |
| }]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(5) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.registry.support.dubbo.DubboRegistryFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%286%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(6) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxRegistryFactoryjava (实现RegistryFactory接口) |
| |-XxxRegistry.java (实现Registry接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.registry.RegistryFactory (纯文本文件,内容为:xxx=com.xxx.XxxRegistryFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxRegistryFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.registry.RegistryFactory; |
| import com.alibaba.dubbo.registry.Registry; |
| import com.alibaba.dubbo.common.URL; |
| |
| |
| public class XxxRegistryFactory implements RegistryFactory { |
| public Registry getRegistry(URL url) { |
| return new XxxRegistry(url); |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxRegistry.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.registry.Registry; |
| import com.alibaba.dubbo.registry.NotifyListener; |
| import com.alibaba.dubbo.common.URL; |
| |
| |
| public class XxxRegistry implements Registry { |
| public void register(URL url) { |
| // ... |
| } |
| public void unregister(URL url) { |
| // ... |
| } |
| public void subscribe(URL url, NotifyListener listener) { |
| // ... |
| } |
| public void unsubscribe(URL url, NotifyListener listener) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.registry.RegistryFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxRegistryFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%9B%91%E6%8E%A7%E4%B8%AD%E5%BF%83%E6%89%A9%E5%B1%95"></a>监控中心扩展</h3> |
| <p>(<a href="MonitorFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/MonitorFactory+SPI-zh" title="MonitorFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%9B%91%E6%8E%A7%E4%B8%AD%E5%BF%83%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>负责服务调用次和调用时间的监控。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.monitor.MonitorFactory |
| com.alibaba.dubbo.monitor.Monitor]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:monitor address="xxx://ip:port" /> <!-- 定义监控中心 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.monitor.support.dubbo.DubboMonitorFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxMonitorFactoryjava (实现MonitorFactory接口) |
| |-XxxMonitor.java (实现Monitor接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.monitor.MonitorFactory (纯文本文件,内容为:xxx=com.xxx.XxxMonitorFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxMonitorFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.monitor.MonitorFactory; |
| import com.alibaba.dubbo.monitor.Monitor; |
| import com.alibaba.dubbo.common.URL; |
| |
| |
| public class XxxMonitorFactory implements MonitorFactory { |
| public Monitor getMonitor(URL url) { |
| return new XxxMonitor(url); |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxMonitor.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.monitor.Monitor; |
| |
| |
| public class XxxMonitor implements Monitor { |
| public void count(URL statistics) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.monitor.MonitorFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxMonitorFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E6%89%A9%E5%B1%95%E7%82%B9%E5%8A%A0%E8%BD%BD%E6%89%A9%E5%B1%95"></a>扩展点加载扩展</h3> |
| <p>(<a href="ExtensionFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/ExtensionFactory+SPI-zh" title="ExtensionFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E6%89%A9%E5%B1%95%E7%82%B9%E5%8A%A0%E8%BD%BD%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>扩展点本身的加载容器,可从不同容器加载扩展点。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.extension.ExtensionFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:application compiler="jdk" />]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.extension.factory.SpiExtensionFactory |
| com.alibaba.dubbo.config.spring.extension.SpringExtensionFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxExtensionFactory.java (实现ExtensionFactory接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.extension.ExtensionFactory (纯文本文件,内容为:xxx=com.xxx.XxxExtensionFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExtensionFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.extension.ExtensionFactory; |
| |
| public class XxxExtensionFactory implements ExtensionFactory { |
| public Object getExtension(Class<?> type, String name) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.extension.ExtensionFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxExtensionFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86%E6%89%A9%E5%B1%95"></a>动态代理扩展</h3> |
| <p>(<a href="ProxyFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/ProxyFactory+SPI-zh" title="ProxyFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>将Invoker接口转换成业务接口。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.ProxyFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol proxy="xxx" /> |
| <dubbo:provider proxy="xxx" /> <!-- 缺省值配置,当<dubbo:protocol>没有配置proxy属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.rpc.proxy.JdkProxyFactory |
| com.alibaba.dubbo.rpc.proxy.JavassistProxyFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxProxyFactory.java (实现ProxyFactory接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.rpc.ProxyFactory (纯文本文件,内容为:xxx=com.xxx.XxxProxyFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxProxyFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.rpc.ProxyFactory; |
| import com.alibaba.dubbo.rpc.Invoker; |
| import com.alibaba.dubbo.rpc.RpcException; |
| |
| |
| public class XxxProxyFactory implements ProxyFactory { |
| public <T> T getProxy(Invoker<T> invoker) throws RpcException { |
| // ... |
| } |
| public <T> Invoker<T> getInvoker(T proxy, Class<T> type, URL url) throws RpcException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.rpc.ProxyFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxProxyFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%BC%96%E8%AF%91%E5%99%A8%E6%89%A9%E5%B1%95"></a>编译器扩展</h3> |
| <p>(<a href="Compiler+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Compiler+SPI-zh" title="Compiler SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%BC%96%E8%AF%91%E5%99%A8%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>Java代码编译器,用于动态生成字节码,加速调用。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.compiler.Compiler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <p>自动加载</p> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.compiler.support.JdkCompiler |
| com.alibaba.dubbo.common.compiler.support.JavassistCompiler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxCompiler.java (实现Compiler接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.compiler.Compiler (纯文本文件,内容为:xxx=com.xxx.XxxCompiler)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxCompiler.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.compiler.Compiler; |
| |
| public class XxxCompiler implements Compiler { |
| public Object getExtension(Class<?> type, String name) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.compiler.Compiler</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxCompiler]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E6%B6%88%E6%81%AF%E6%B4%BE%E5%8F%91%E6%89%A9%E5%B1%95"></a>消息派发扩展</h3> |
| <p>(<a href="Dispatcher+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Dispatcher+SPI-zh" title="Dispatcher SPI-zh">+</a>) (<a href="#SPIReference-zh-%E6%B6%88%E6%81%AF%E6%B4%BE%E5%8F%91%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>通道信息派发器,用于指定线程池模型。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.Dispatcher]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol dispatcher="xxx" /> |
| <dubbo:provider dispatcher="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置dispatcher属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.transport.dispatcher.all.AllDispatcher |
| com.alibaba.dubbo.remoting.transport.dispatcher.direct.DirectDispatcher |
| com.alibaba.dubbo.remoting.transport.dispatcher.message.MessageOnlyDispatcher |
| com.alibaba.dubbo.remoting.transport.dispatcher.execution.ExecutionDispatcher |
| com.alibaba.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedDispatcher]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxDispatcher.java (实现Dispatcher接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.remoting.Dispatcher (纯文本文件,内容为:xxx=com.xxx.XxxDispatcher)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxDispatcher.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.Dispatcher; |
| |
| public class XxxDispatcher implements Dispatcher { |
| public Group lookup(URL url) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.remoting.Dispatcher</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxDispatcher]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%BA%BF%E7%A8%8B%E6%B1%A0%E6%89%A9%E5%B1%95"></a>线程池扩展</h3> |
| <p>(<a href="ThreadPool+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/ThreadPool+SPI-zh" title="ThreadPool SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%BA%BF%E7%A8%8B%E6%B1%A0%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>服务提供方线程程实现策略,当服务器收到一个请求时,需要在线程池中创建一个线程去执行服务提供方业务逻辑。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.threadpool.ThreadPool]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol threadpool="xxx" /> |
| <dubbo:provider threadpool="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置threadpool时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.threadpool.FixedThreadPool |
| com.alibaba.dubbo.common.threadpool.CachedThreadPool]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxThreadPool.java (实现ThreadPool接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.threadpool.ThreadPool (纯文本文件,内容为:xxx=com.xxx.XxxThreadPool)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxThreadPool.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.threadpool.ThreadPool; |
| import java.util.concurrent.Executor; |
| |
| |
| public class XxxThreadPool implements ThreadPool { |
| public Executor getExecutor() { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.threadpool.ThreadPool</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxThreadPool]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E5%BA%8F%E5%88%97%E5%8C%96%E6%89%A9%E5%B1%95"></a>序列化扩展</h3> |
| <p>(<a href="Serialization+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Serialization+SPI-zh" title="Serialization SPI-zh">+</a>) (<a href="#SPIReference-zh-%E5%BA%8F%E5%88%97%E5%8C%96%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>将对象转成字节流,用于网络传输,以及将字节流转为对象,用于在收到字节流数据后还原成对象。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.serialize.Serialization |
| com.alibaba.dubbo.common.serialize.ObjectInput |
| com.alibaba.dubbo.common.serialize.ObjectOutput]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol serialization="xxx" /> <!-- 协议的序列化方式 --> |
| <dubbo:provider serialization="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置serialization时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.serialize.dubbo.DubboSerialization |
| com.alibaba.dubbo.common.serialize.hessian.Hessian2Serialization |
| com.alibaba.dubbo.common.serialize.java.JavaSerialization |
| com.alibaba.dubbo.common.serialize.java.CompactedJavaSerialization]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxSerialization.java (实现Serialization接口) |
| |-XxxObjectInput.java (实现ObjectInput接口) |
| |-XxxObjectOutput.java (实现ObjectOutput接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.serialize.Serialization (纯文本文件,内容为:xxx=com.xxx.XxxSerialization)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxSerialization.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.serialize.Serialization; |
| import com.alibaba.dubbo.common.serialize.ObjectInput; |
| import com.alibaba.dubbo.common.serialize.ObjectOutput; |
| |
| |
| public class XxxSerialization implements Serialization { |
| public ObjectOutput serialize(Parameters parameters, OutputStream output) throws IOException { |
| return new XxxObjectOutput(output); |
| } |
| public ObjectInput deserialize(Parameters parameters, InputStream input) throws IOException { |
| return new XxxObjectInput(input); |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.serialize.Serialization</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxSerialization]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%BD%91%E7%BB%9C%E4%BC%A0%E8%BE%93%E6%89%A9%E5%B1%95"></a>网络传输扩展</h3> |
| <p>(<a href="Transporter+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Transporter+SPI-zh" title="Transporter SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%BD%91%E7%BB%9C%E4%BC%A0%E8%BE%93%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>远程通讯的服务器及客户端传输实现。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.Transporter |
| com.alibaba.dubbo.remoting.Server |
| com.alibaba.dubbo.remoting.Client]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol transporter="xxx" /> <!-- 服务器和客户端使用相同的传输实现 --> |
| <dubbo:protocol server="xxx" client="xxx" /> <!-- 服务器和客户端使用不同的传输实现 --> |
| <dubbo:provider transporter="xxx" server="xxx" client="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置transporter/server/client属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.transport.transporter.netty.NettyTransporter |
| com.alibaba.dubbo.remoting.transport.transporter.mina.MinaTransporter |
| com.alibaba.dubbo.remoting.transport.transporter.grizzly.GrizzlyTransporter]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxTransporter.java (实现Transporter接口) |
| |-XxxServer.java (实现Server接口) |
| |-XxxClient.java (实现Client接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.remoting.Transporter (纯文本文件,内容为:xxx=com.xxx.XxxTransporter)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxTransporter.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.Transporter; |
| |
| |
| public class XxxTransporter implements Transporter { |
| public Server bind(URL url, ChannelHandler handler) throws RemotingException { |
| return new XxxServer(url, handler); |
| } |
| public Client connect(URL url, ChannelHandler handler) throws RemotingException { |
| return new XxxClient(url, handler); |
| } |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxServer.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.transport.transporter.AbstractServer; |
| |
| public class XxxServer extends AbstractServer { |
| public XxxServer(URL url, ChannelHandler handler) throws RemotingException{ |
| super(url, handler); |
| } |
| protected void doOpen() throws Throwable { |
| // ... |
| } |
| protected void doClose() throws Throwable { |
| // ... |
| } |
| public Collection<Channel> getChannels() { |
| // ... |
| } |
| public Channel getChannel(InetSocketAddress remoteAddress) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxClient.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.transport.transporter.AbstractClient; |
| |
| public class XxxClient extends AbstractClient { |
| public XxxServer(URL url, ChannelHandler handler) throws RemotingException{ |
| super(url, handler); |
| } |
| protected void doOpen() throws Throwable { |
| // ... |
| } |
| protected void doClose() throws Throwable { |
| // ... |
| } |
| protected void doConnect() throws Throwable { |
| // ... |
| } |
| public Channel getChannel() { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.remoting.Transporter</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxTransporter]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E4%BF%A1%E6%81%AF%E4%BA%A4%E6%8D%A2%E6%89%A9%E5%B1%95"></a>信息交换扩展</h3> |
| <p>(<a href="Exchanger+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Exchanger+SPI-zh" title="Exchanger SPI-zh">+</a>) (<a href="#SPIReference-zh-%E4%BF%A1%E6%81%AF%E4%BA%A4%E6%8D%A2%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>基于传输层之上,实现Request-Response信息交换语义。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.exchange.Exchanger |
| com.alibaba.dubbo.remoting.exchange.ExchangeServer |
| com.alibaba.dubbo.remoting.exchange.ExchangeClient]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol exchanger="xxx" /> |
| <dubbo:provider exchanger="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置exchanger属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.exchange.exchanger.HeaderExchanger]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxExchanger.java (实现Exchanger接口) |
| |-XxxExchangeServer.java (实现ExchangeServer接口) |
| |-XxxExchangeClient.java (实现ExchangeClient接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.remoting.exchange.Exchanger (纯文本文件,内容为:xxx=com.xxx.XxxExchanger)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExchanger.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.exchange.Exchanger; |
| |
| |
| public class XxxExchanger implements Exchanger { |
| public ExchangeServer bind(URL url, ExchangeHandler handler) throws RemotingException { |
| return new XxxExchangeServer(url, handler); |
| } |
| public ExchangeClient connect(URL url, ExchangeHandler handler) throws RemotingException { |
| return new XxxExchangeClient(url, handler); |
| } |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExchangeServer.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.exchange.ExchangeServer; |
| |
| public class XxxExchangeServer impelements ExchangeServer { |
| // ... |
| }]]></script> |
| </div></div> |
| |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxExchangeClient.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.exchange.ExchangeClient; |
| |
| public class XxxExchangeClient impelments ExchangeClient { |
| // ... |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.remoting.exchange.Exchanger</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxExchanger]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%BB%84%E7%BD%91%E6%89%A9%E5%B1%95"></a>组网扩展</h3> |
| <p>(<a href="Networker+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Networker+SPI-zh" title="Networker SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%BB%84%E7%BD%91%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>对等网络节点组网器。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.p2p.Networker]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol networker="xxx" /> |
| <dubbo:provider networker="xxx" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置networker属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.p2p.support.MulticastNetworker |
| com.alibaba.dubbo.remoting.p2p.support.FileNetworker]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxNetworker.java (实现Networker接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.remoting.p2p.Networker (纯文本文件,内容为:xxx=com.xxx.XxxNetworker)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxNetworker.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.p2p.Networker; |
| |
| public class XxxNetworker implements Networker { |
| public Group lookup(URL url) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.remoting.p2p.Networker</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxNetworker]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-Telnet%E5%91%BD%E4%BB%A4%E6%89%A9%E5%B1%95"></a>Telnet命令扩展</h3> |
| <p>(<a href="TelnetHandler+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/TelnetHandler+SPI-zh" title="TelnetHandler SPI-zh">+</a>) (<a href="#SPIReference-zh-Telnet%E5%91%BD%E4%BB%A4%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>所有服务器均支持telnet访问,用于人工干预。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.telnet.TelnetHandler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol telnet="xxx,yyy" /> |
| <dubbo:provider telnet="xxx,yyy" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置telnet属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.remoting.telnet.support.ClearTelnetHandler |
| com.alibaba.dubbo.remoting.telnet.support.ExitTelnetHandler |
| com.alibaba.dubbo.remoting.telnet.support.HelpTelnetHandler |
| com.alibaba.dubbo.remoting.telnet.support.StatusTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.ListTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.ChangeTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.CurrentTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.InvokeTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.TraceTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.CountTelnetHandler |
| com.alibaba.dubbo.rpc.dubbo.telnet.PortTelnetHandler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxTelnetHandler.java (实现TelnetHandler接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.remoting.telnet.TelnetHandler (纯文本文件,内容为:xxx=com.xxx.XxxTelnetHandler)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxTelnetHandler.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.remoting.telnet.TelnetHandler; |
| |
| @Help(parameter="...", summary="...", detail="...") |
| |
| public class XxxTelnetHandler implements TelnetHandler { |
| public String telnet(Channel channel, String message) throws RemotingException { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.remoting.telnet.TelnetHandler</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxTelnetHandler]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>用法</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[telnet 127.0.0.1 20880 |
| dubbo> xxx args]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%8A%B6%E6%80%81%E6%A3%80%E6%9F%A5%E6%89%A9%E5%B1%95"></a>状态检查扩展</h3> |
| <p>(<a href="StatusChecker+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/StatusChecker+SPI-zh" title="StatusChecker SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%8A%B6%E6%80%81%E6%A3%80%E6%9F%A5%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>检查服务依赖各种资源的状态,此状态检查可同时用于telnet的status命令和hosting的status页面。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.status.StatusChecker]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol status="xxx,yyy" /> |
| <dubbo:provider status="xxx,yyy" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置status属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.status.support.MemoryStatusChecker |
| com.alibaba.dubbo.common.status.support.LoadStatusChecker |
| com.alibaba.dubbo.rpc.dubbo.status.ServerStatusChecker |
| com.alibaba.dubbo.rpc.dubbo.status.ThreadPoolStatusChecker |
| com.alibaba.dubbo.registry.directory.RegistryStatusChecker |
| com.alibaba.dubbo.rpc.config.spring.status.SpringStatusChecker |
| com.alibaba.dubbo.rpc.config.spring.status.DataSourceStatusChecker]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxStatusChecker.java (实现StatusChecker接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.status.StatusChecker (纯文本文件,内容为:xxx=com.xxx.XxxStatusChecker)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxStatusChecker.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.status.StatusChecker; |
| |
| public class XxxStatusChecker implements StatusChecker { |
| public Status check() { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.status.StatusChecker</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxStatusChecker]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E5%AE%B9%E5%99%A8%E6%89%A9%E5%B1%95"></a>容器扩展</h3> |
| <p>(<a href="Container+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Container+SPI-zh" title="Container SPI-zh">+</a>) (<a href="#SPIReference-zh-%E5%AE%B9%E5%99%A8%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>服务容器扩展,用于自定义加载内容。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.container.Container]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[java com.alibaba.dubbo.container.Main spring jetty log4j]]></script> |
| </div></div> |
| |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.container.spring.SpringContainer |
| com.alibaba.dubbo.container.spring.JettyContainer |
| com.alibaba.dubbo.container.spring.Log4jContainer]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxContainer.java (实现Container接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.container.Container (纯文本文件,内容为:xxx=com.xxx.XxxContainer)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxContainer.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| com.alibaba.dubbo.container.Container; |
| |
| |
| public class XxxContainer implements Container { |
| public Status start() { |
| // ... |
| } |
| public Status stop() { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.container.Container</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxContainer]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E9%A1%B5%E9%9D%A2%E6%89%A9%E5%B1%95"></a>页面扩展</h3> |
| <p>(<a href="PageHandler+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/PageHandler+SPI-zh" title="PageHandler SPI-zh">+</a>) (<a href="#SPIReference-zh-%E9%A1%B5%E9%9D%A2%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>对等网络节点组网器。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.container.page.PageHandler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:protocol page="xxx,yyy" /> |
| <dubbo:provider page="xxx,yyy" /> <!-- 缺省值设置,当<dubbo:protocol>没有配置page属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.container.page.pages.HomePageHandler |
| com.alibaba.dubbo.container.page.pages.StatusPageHandler |
| com.alibaba.dubbo.container.page.pages.LogPageHandler |
| com.alibaba.dubbo.container.page.pages.SystemPageHandler]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxPageHandler.java (实现PageHandler接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.container.page.PageHandler (纯文本文件,内容为:xxx=com.xxx.XxxPageHandler)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxPageHandler.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.container.page.PageHandler; |
| |
| public class XxxPageHandler implements PageHandler { |
| public Group lookup(URL url) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.container.page.PageHandler</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxPageHandler]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E7%BC%93%E5%AD%98%E6%89%A9%E5%B1%95"></a>缓存扩展</h3> |
| <p>(<a href="CacheFactory+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/CacheFactory+SPI-zh" title="CacheFactory SPI-zh">+</a>) (<a href="#SPIReference-zh-%E7%BC%93%E5%AD%98%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>用请求参数作为key,缓存返回结果。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.cache.CacheFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:service cache="lru" /> |
| <dubbo:service><dubbo:method cache="lru" /></dubbo:service> <!-- 方法级缓存 --> |
| <dubbo:provider cache="xxx,yyy" /> <!-- 缺省值设置,当<dubbo:service>没有配置cache属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.cache.support.lru.LruCacheFactory |
| com.alibaba.dubbo.cache.support.threadlocal.ThreadLocalCacheFactory |
| com.alibaba.dubbo.cache.support.jcache.JCacheFactory]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxCacheFactory.java (实现StatusChecker接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.cache.CacheFactory (纯文本文件,内容为:xxx=com.xxx.XxxCacheFactory)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxCacheFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.cache.CacheFactory; |
| |
| public class XxxCacheFactory implements CacheFactory { |
| public Cache getCache(URL url, String name) { |
| return new XxxCache(url, name); |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxCacheFactory.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.cache.Cache; |
| |
| public class XxxCache implements Cache { |
| public Cache(URL url, String name) { |
| // ... |
| } |
| public void put(Object key, Object value) { |
| // ... |
| } |
| public Object get(Object key) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.cache.CacheFactory</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxCacheFactory]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E9%AA%8C%E8%AF%81%E6%89%A9%E5%B1%95"></a>验证扩展</h3> |
| <p>(<a href="Validation+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/Validation+SPI-zh" title="Validation SPI-zh">+</a>) (<a href="#SPIReference-zh-%E9%AA%8C%E8%AF%81%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>参数验证扩展点。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.validation.Validation]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:service validation="xxx,yyy" /> |
| <dubbo:provider validation="xxx,yyy" /> <!-- 缺省值设置,当<dubbo:service>没有配置validation属性时,使用此配置 -->]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.validation.support.jvalidation.JValidation]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxValidation.java (实现Validation接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.validation.Validation (纯文本文件,内容为:xxx=com.xxx.XxxValidation)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxValidation.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.validation.Validation; |
| |
| public class XxxValidation implements Validation { |
| public Object getValidator(URL url) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxValidator.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.validation.Validator; |
| |
| public class XxxValidator implements Validator { |
| public XxxValidator(URL url) { |
| // ... |
| } |
| public void validate(Invocation invocation) throws Exception { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.validation.Validation</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxValidation]]></script> |
| </div></div> |
| <h3><a name="SPIReference-zh-%E6%97%A5%E5%BF%97%E9%80%82%E9%85%8D%E6%89%A9%E5%B1%95"></a>日志适配扩展</h3> |
| <p>(<a href="LoggerAdapter+SPI-zh.htm" tppabs="http://10.20.160.198/wiki/display/dubbo/LoggerAdapter+SPI-zh" title="LoggerAdapter SPI-zh">+</a>) (<a href="#SPIReference-zh-%E6%97%A5%E5%BF%97%E9%80%82%E9%85%8D%E6%89%A9%E5%B1%95">#</a>)</p> |
| |
| <h4><a name="SPIReference-zh-%281%29%E6%89%A9%E5%B1%95%E8%AF%B4%E6%98%8E%EF%BC%9A"></a>(1) 扩展说明:</h4> |
| |
| <p>日志输出适配扩展点。</p> |
| |
| <h4><a name="SPIReference-zh-%282%29%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%EF%BC%9A"></a>(2) 扩展接口:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[com.alibaba.dubbo.common.logger.LoggerAdapter]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%283%29%E6%89%A9%E5%B1%95%E9%85%8D%E7%BD%AE%EF%BC%9A"></a>(3) 扩展配置:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[<dubbo:application logger="xxx" />]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: xml; gutter: false"><![CDATA[-Ddubbo:application.logger=xxx]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%284%29%E5%B7%B2%E7%9F%A5%E6%89%A9%E5%B1%95%EF%BC%9A"></a>(4) 已知扩展:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[slf4j=com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter |
| jcl=com.alibaba.dubbo.common.logger.jcl.JclLoggerAdapter |
| log4j=com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter |
| jdk=com.alibaba.dubbo.common.logger.jdk.JdkLoggerAdapter]]></script> |
| </div></div> |
| |
| <h4><a name="SPIReference-zh-%285%29%E6%89%A9%E5%B1%95%E7%A4%BA%E4%BE%8B%EF%BC%9A"></a>(5) 扩展示例:</h4> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>Maven项目结构</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[src |
| |-main |
| |-java |
| |-com |
| |-xxx |
| |-XxxLoggerAdapter.java (实现LoggerAdapter接口) |
| |-resources |
| |-META-INF |
| |-dubbo |
| |-com.alibaba.dubbo.common.logger.LoggerAdapter (纯文本文件,内容为:xxx=com.xxx.XxxLoggerAdapter)]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxLoggerAdapter.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.logger.LoggerAdapter; |
| |
| public class XxxLoggerAdapter implements LoggerAdapter { |
| public Logger getLogger(URL url) { |
| // ... |
| } |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>XxxLogger.java</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[package com.xxx; |
| |
| import com.alibaba.dubbo.common.logger.Logger; |
| |
| public class XxxLogger implements Logger { |
| public XxxLogger(URL url) { |
| // ... |
| } |
| public void info(String msg) { |
| // ... |
| } |
| // ... |
| }]]></script> |
| </div></div> |
| <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>META-INF/dubbo/com.alibaba.dubbo.common.logger.LoggerAdapter</b></div><div class="codeContent panelContent"> |
| <script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[xxx=com.xxx.XxxLoggerAdapter]]></script> |
| </div></div> |
| </div> |
| |
| <!-- |
| <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
| xmlns:dc="http://purl.org/dc/elements/1.1/" |
| xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> |
| <rdf:Description |
| rdf:about="http://code.alibabatech.com/wiki/display/dubbo/SPI+Reference-zh" |
| dc:identifier="http://code.alibabatech.com/wiki/display/dubbo/SPI+Reference-zh" |
| dc:title="SPI Reference-zh" |
| trackback:ping="http://code.alibabatech.com/wiki/rpc/trackback/6947814"/> |
| </rdf:RDF> |
| --> |
| |
| |
| |
| |
| |
| <fieldset class="hidden parameters"> |
| <legend>Labels parameters</legend> |
| <input type="hidden" id="domainName" value="http://code.alibabatech.com/wiki"> |
| <input type="hidden" id="pageId" value="6947814"> |
| <input type="hidden" id="spaceKey" value="dubbo"> |
| </fieldset> |
| |
| <div id="labels-section" class="pageSection"> |
| <div class="labels-editor"> |
| <span id="labels-section-title" class="label-title"> |
| <b>Labels:</b> |
| </span> |
| <div id="labels-section-content" class="content-column"> |
| <span id="labels-section-title-none" class="label-title none "> |
| None |
| </span> |
| |
| <div id="labelsList" class="label-list"> |
| </div> |
| |
| </div> |
| |
| <span class="errorMessage error" id="errorSpan"></span> |
| <form method="GET" action="" id="add-labels-form"> |
| <div id="labelInputSpan" class="labels-input"> |
| <div id="labelOperationErrorContainer" class="hidden"> |
| <span class="error"><span class="errorMessage" id="labelOperationErrorMessage"></span></span> |
| </div> |
| |
| <div class="caption">Enter labels to add to this page:</div> |
| <div id="label-input-fields"> |
| <input autocomplete="off" id="labelsString" name="labelsString" value="" size="40"> |
| <input id="add-labels-editor-button" type="submit" class="add-labels" value="Add"> |
| <input id="close-labels-editor-button" type="submit" class="hide-labels-editor" value="Done"> |
| </div> |
| <div id="waitImageAndStatus"> |
| <img class="waiting" alt="Please wait" src="wait.gif" tppabs="http://10.20.160.198/wiki/s/en/2166/34/_/images/icons/wait.gif"> |
| <span id="labelOperationStatus" class="smalltext"></span> |
| </div> |
| <div id="labelsAutocompleteList" class="aui-dd-parent"></div> |
| <div class="labels-tip"> |
| <div id="suggestedLabelsSpan"></div> |
| Looking for a label? Just start typing. |
| </div> |
| </div> |
| </form> |
| </div> |
| </div> |
| |
| <div id="children-section" class="pageSection children-hidden"> |
| |
| <div class="section-header summary"> |
| <h2 id="children-section-title" class="section-title"> |
| <a href="SPI+Reference-zh-showChildren=true.htm#children" tppabs="http://10.20.160.198/wiki/display/dubbo/SPI+Reference-zh?showChildren=true#children" class="children-show-hide"> |
| 26 Child Pages |
| </a> |
| </h2> |
| |
| <a href="SPI+Reference-zh-showChildren=true.htm#children" tppabs="http://10.20.160.198/wiki/display/dubbo/SPI+Reference-zh?showChildren=true#children" class="children-show-hide icon"></a> |
| |
| <span class="noprint grey"> |
| <a class="children-subtitle" href="javascript:if(confirm(%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814#selectedPageInHierarchy%27" tppabs="http://10.20.160.198/wiki/pages/listpages-dirview.action?key=dubbo&openId=6947814#selectedPageInHierarchy">Reorder Pages</a> |
| </span> |
| </div> |
| <div id="page-children" class="pageSectionBody"> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <fieldset class="parameters hidden"> |
| <input type="hidden" id="deleteCommentConfirmMessage" value="Are you sure you want to remove the comment?"> |
| <input type="hidden" id="collapseTooltip" value="Click to toggle the display of this comment."> |
| </fieldset> |
| |
| <fieldset class="hidden parameters i18n"> |
| <input type="hidden" title="i18n.cancel.name" value="Cancel"> |
| </fieldset> |
| |
| |
| |
| |
| |
| |
| <div id="comments-section" class="pageSection"> |
| |
| |
| |
| |
| <a id="add-comment-bottom" href="SPI+Reference-zh-showComments=true&showCommentArea=true.htm#addcomment" tppabs="http://10.20.160.198/wiki/display/dubbo/SPI+Reference-zh?showComments=true&showCommentArea=true#addcomment"> |
| Add Comment |
| </a> |
| </div> |
| |
| |
| |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="text/x-template" title="manage-watchers-dialog"> |
| <div class="dialog-content"> |
| <div class="column page-watchers"> |
| <h3>Watching this page</h3> |
| <p class="description">These people are notified when the page is changed. You can add or remove people from this list.</p> |
| <form action="/wiki/json/addwatch.action" method="POST"> |
| <input type="hidden" name="atl_token" value="c116db80711201b36e2067aa83f3b044c2d5a30e"> |
| <input type="hidden" name="pageId" value="6947814"/> |
| <input type="hidden" id="add-watcher-username" name="username" value=""/> |
| <label for="add-watcher-user">User</label> |
| <input id="add-watcher-user" name="userFullName" type="search" class="autocomplete-user" |
| value="" placeholder="Full name or username" autocomplete="off" |
| data-max="10" data-target="#add-watcher-username" data-dropdown-target="#add-watcher-dropdown" |
| data-template="{title}" data-none-message="No matching users found."> |
| <input id="add-watcher-submit" type="submit" name="add" value="Add"> |
| <div id="add-watcher-dropdown" class="aui-dd-parent autocomplete"></div> |
| <div class="status hidden"></div> |
| </form> |
| <ul class="user-list"> |
| <li class="loading">Loading…</li> |
| <li class="no-users hidden">No page watchers</li> |
| </ul> |
| </div> |
| <div class="column space-watchers"> |
| <h3>Watching this space</h3> |
| <p class="description">These people are notified when any content in the space is changed. You cannot modify this list.</p> |
| <ul class="user-list"> |
| <li class="loading">Loading…</li> |
| <li class="no-users hidden">No space watchers</li> |
| </ul> |
| </div> |
| </div> |
| </script> |
| <script type="text/x-template" title="manage-watchers-user"> |
| <li class="watch-user"> |
| <img class="profile-picture confluence-userlink" src="{iconUrl}" data-username="{username}"> |
| <a class="confluence-userlink" href="{url}" data-username="{username}">{fullName} <span class="username">({username})</span></a> |
| <span class="remove-watch" title="Remove" |
| data-username="{username}">Remove</span> |
| </li> |
| </script> |
| <script type="text/x-template" title="manage-watchers-help-link"> |
| <div class="dialog-help-link"> |
| <a href="http://docs.atlassian.com/confluence/docs-35/Managing+Watchers" target="_blank">Help</a> |
| </div> |
| </script> |
| |
| <br class="clear"> |
| </div><!-- \#main --> |
| |
| <div id="footer"> |
| <p class="license license-opensource"> |
| Powered by a free <b>Atlassian Confluence Open Source Project License</b> granted to Alibaba Tech. <a href="javascript:if(confirm(%27http://www.atlassian.com/c/conf/11461 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://www.atlassian.com/c/conf/11461%27" tppabs="http://www.atlassian.com/c/conf/11461">Evaluate Confluence today</a>.<br> |
| </p> |
| |
| <ul id="poweredby"> |
| <li class="noprint">Powered by <a href="javascript:if(confirm(%27http://www.atlassian.com/software/confluence \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://www.atlassian.com/software/confluence%27" tppabs="http://www.atlassian.com/software/confluence" class="hover-footer-link">Atlassian Confluence</a> 3.5.9, the <a href="javascript:if(confirm(%27http://www.atlassian.com/software/confluence/tour/enterprise-wiki.jsp \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://www.atlassian.com/software/confluence/tour/enterprise-wiki.jsp%27" tppabs="http://www.atlassian.com/software/confluence/tour/enterprise-wiki.jsp" class="hover-footer-link">Enterprise Wiki</a></li> |
| <li class="print-only">Printed by Atlassian Confluence 3.5.9, the Enterprise Wiki.</li> |
| <li class="noprint"> | <a href="javascript:if(confirm(%27http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470 \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470%27" tppabs="http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470" class="hover-footer-link">Report a bug</a></li> |
| <li class="noprint"> | <a href="javascript:if(confirm(%27http://www.atlassian.com/about/connected.jsp?s_kwcid=Confluence-stayintouch \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://www.atlassian.com/about/connected.jsp?s_kwcid=Confluence-stayintouch%27" tppabs="http://www.atlassian.com/about/connected.jsp?s_kwcid=Confluence-stayintouch" class="hover-footer-link">Atlassian News</a></li> |
| </ul> |
| |
| |
| |
| 友情链接:<a href="javascript:if(confirm(%27http://code.taobao.org/ \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?%27))window.location=%27http://code.taobao.org/%27" tppabs="http://code.taobao.org/">Taocode</a> |
| <script type="text/javascript"> |
| |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', 'UA-31474478-1']); |
| _gaq.push(['_trackPageview']); |
| |
| (function() { |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www/') + '.google-analytics.com/ga.js'; |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| })(); |
| |
| </script> |
| </div></div><!-- \#full-height-container --> |
| </div><!-- \#page --> |
| </body> |
| </html> |