| <!DOCTYPE html> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link rel="shortcut icon" type="image/x-icon" href="../../../../favicon.ico" /> |
| <title> |
| |
| ServletScopes |
| |
| |
| | Guice |
| |
| </title> |
| <link href="../../../../../javadoc/assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> |
| <link href="../../../../../javadoc/assets/customizations.css" rel="stylesheet" type="text/css" /> |
| <script src="../../../../../javadoc/assets/search_autocomplete.js" type="text/javascript"></script> |
| <script src="../../../../../javadoc/assets/jquery-resizable.min.js" type="text/javascript"></script> |
| <script src="../../../../../javadoc/assets/android-developer-docs.js" type="text/javascript"></script> |
| <script src="../../../../../javadoc/assets/prettify.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| setToRoot("../../../../", "../../../../../javadoc/assets/"); |
| </script> |
| <script src="../../../../../javadoc/assets/android-developer-reference.js" type="text/javascript"></script> |
| <script src="../../../../../javadoc/assets/navtree_data.js" type="text/javascript"></script> |
| <script src="../../../../../javadoc/assets/customizations.js" type="text/javascript"></script> |
| <noscript> |
| <style type="text/css"> |
| html,body{overflow:auto;} |
| #body-content{position:relative; top:0;} |
| #doc-content{overflow:visible;border-left:3px solid #666;} |
| #side-nav{padding:0;} |
| #side-nav .toggle-list ul {display:block;} |
| #resize-packages-nav{border-bottom:3px solid #666;} |
| </style> |
| </noscript> |
| </head> |
| |
| <body class="Guice_1.0"> |
| |
| <div id="header"> |
| <div id="headerLeft"> |
| |
| <span id="masthead-title">Guice</span> |
| |
| </div> |
| <div id="headerRight"> |
| |
| <div id="search" > |
| <div id="searchForm"> |
| <form accept-charset="utf-8" class="gsc-search-box" |
| onsubmit="return submit_search()"> |
| <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody> |
| <tr> |
| <td class="gsc-input"> |
| <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off" |
| title="search developer docs" name="q" |
| value="search developer docs" |
| onFocus="search_focus_changed(this, true)" |
| onBlur="search_focus_changed(this, false)" |
| onkeydown="return search_changed(event, true, '../../../../')" |
| onkeyup="return search_changed(event, false, '../../../../')" /> |
| <div id="search_filtered_div" class="no-display"> |
| <table id="search_filtered" cellspacing=0> |
| </table> |
| </div> |
| </td> |
| <td class="gsc-search-button"> |
| <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" /> |
| </td> |
| <td class="gsc-clear-button"> |
| <div title="clear results" class="gsc-clear-button"> </div> |
| </td> |
| </tr></tbody> |
| </table> |
| </form> |
| </div><!-- searchForm --> |
| </div><!-- search --> |
| |
| |
| <div id="api-level-toggle"> |
| <input type="checkbox" id="apiLevelCheckbox" onclick="toggleApiLevelSelector(this)" /> |
| <label for="apiLevelCheckbox" class="disabled">Filter by API Level: </label> |
| <select id="apiLevelSelector"> |
| <!-- option elements added by buildApiLevelSelector() --> |
| </select> |
| </div> |
| <script> |
| var SINCE_DATA = [ 'Guice_1.0', 'Guice_2.0', 'Guice_3.0', 'Guice_4.0' ]; |
| |
| var SINCE_LABELS = [ 'Guice_1.0', 'Guice_2.0', 'Guice_3.0', 'Guice_4.0' ]; |
| buildApiLevelSelector(); |
| addLoadEvent(changeApiLevel); |
| </script> |
| |
| |
| |
| </div> |
| </div><!-- header --> |
| |
| |
| <div class="g-section g-tpl-240" id="body-content"> |
| <div class="g-unit g-first side-nav-resizable" id="side-nav"> |
| <div id="swapper"> |
| <div id="nav-panels"> |
| <div id="resize-packages-nav"> |
| <div id="packages-nav"> |
| <div id="index-links"><nobr> |
| <a href="../../../../packages.html" >Package Index</a> | |
| <a href="../../../../classes.html" >Class Index</a></nobr> |
| </div> |
| <ul> |
| |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/package-summary.html">com.google.inject</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../com/google/inject/assistedinject/package-summary.html">com.google.inject.assistedinject</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/binder/package-summary.html">com.google.inject.binder</a></li> |
| <li class="api apilevel-Guice_3.0"> |
| <a href="../../../../com/google/inject/grapher/package-summary.html">com.google.inject.grapher</a></li> |
| <li class="api apilevel-Guice_3.0"> |
| <a href="../../../../com/google/inject/grapher/graphviz/package-summary.html">com.google.inject.grapher.graphviz</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/jndi/package-summary.html">com.google.inject.jndi</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/matcher/package-summary.html">com.google.inject.matcher</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../com/google/inject/multibindings/package-summary.html">com.google.inject.multibindings</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/name/package-summary.html">com.google.inject.name</a></li> |
| <li class="api apilevel-Guice_3.0"> |
| <a href="../../../../com/google/inject/persist/package-summary.html">com.google.inject.persist</a></li> |
| <li class="api apilevel-Guice_3.0"> |
| <a href="../../../../com/google/inject/persist/finder/package-summary.html">com.google.inject.persist.finder</a></li> |
| <li class="api apilevel-Guice_3.0"> |
| <a href="../../../../com/google/inject/persist/jpa/package-summary.html">com.google.inject.persist.jpa</a></li> |
| <li class="selected api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/servlet/package-summary.html">com.google.inject.servlet</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/spi/package-summary.html">com.google.inject.spi</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../com/google/inject/spring/package-summary.html">com.google.inject.spring</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../com/google/inject/throwingproviders/package-summary.html">com.google.inject.throwingproviders</a></li> |
| <li class="api apilevel-Guice_1.0"> |
| <a href="../../../../com/google/inject/tools/jmx/package-summary.html">com.google.inject.tools.jmx</a></li> |
| <li class="api apilevel-Guice_2.0"> |
| <a href="../../../../com/google/inject/util/package-summary.html">com.google.inject.util</a></li> |
| </ul><br/> |
| </div> <!-- end packages --> |
| </div> <!-- end resize-packages --> |
| <div id="classes-nav"> |
| <ul> |
| |
| <li><h2>Interfaces</h2> |
| <ul> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/InstanceFilterBinding.html">InstanceFilterBinding</a></li> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/InstanceServletBinding.html">InstanceServletBinding</a></li> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/LinkedFilterBinding.html">LinkedFilterBinding</a></li> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/LinkedServletBinding.html">LinkedServletBinding</a></li> |
| <li class="api apilevel-Guice_2.0"><a href="../../../../com/google/inject/servlet/ServletModule.FilterKeyBindingBuilder.html">ServletModule.FilterKeyBindingBuilder</a></li> |
| <li class="api apilevel-Guice_2.0"><a href="../../../../com/google/inject/servlet/ServletModule.ServletKeyBindingBuilder.html">ServletModule.ServletKeyBindingBuilder</a></li> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/ServletModuleBinding.html">ServletModuleBinding</a></li> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/ServletModuleTargetVisitor.html">ServletModuleTargetVisitor</a><T, V></li> |
| </ul> |
| </li> |
| |
| <li><h2>Classes</h2> |
| <ul> |
| <li class="api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/GuiceFilter.html">GuiceFilter</a></li> |
| <li class="api apilevel-Guice_2.0"><a href="../../../../com/google/inject/servlet/GuiceServletContextListener.html">GuiceServletContextListener</a></li> |
| <li class="api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/ServletModule.html">ServletModule</a></li> |
| <li class="selected api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/ServletScopes.html">ServletScopes</a></li> |
| </ul> |
| </li> |
| |
| <li><h2>Annotations</h2> |
| <ul> |
| <li class="api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/RequestParameters.html">RequestParameters</a></li> |
| <li class="api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/RequestScoped.html">RequestScoped</a></li> |
| <li class="api apilevel-Guice_4.0"><a href="../../../../com/google/inject/servlet/ScopingOnly.html">ScopingOnly</a></li> |
| <li class="api apilevel-Guice_1.0"><a href="../../../../com/google/inject/servlet/SessionScoped.html">SessionScoped</a></li> |
| </ul> |
| </li> |
| |
| <li><h2>Enums</h2> |
| <ul> |
| <li class="api apilevel-Guice_3.0"><a href="../../../../com/google/inject/servlet/UriPatternType.html">UriPatternType</a></li> |
| </ul> |
| </li> |
| |
| <li><h2>Exceptions</h2> |
| <ul> |
| <li class="api apilevel-Guice_4.0"><a href="../../../../com/google/inject/servlet/ScopingException.html">ScopingException</a></li> |
| </ul> |
| </li> |
| |
| </ul><br/> |
| </div><!-- end classes --> |
| </div><!-- end nav-panels --> |
| <div id="nav-tree" style="display:none"> |
| <div id="index-links"><nobr> |
| <a href="../../../../packages.html" >Package Index</a> | |
| <a href="../../../../classes.html" >Class Index</a></nobr> |
| </div> |
| </div><!-- end nav-tree --> |
| </div><!-- end swapper --> |
| </div> <!-- end side-nav --> |
| <script> |
| if (!isMobile) { |
| $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav"); |
| chooseDefaultNav(); |
| if ($("#nav-tree").is(':visible')) { |
| init_default_navtree("../../../../"); |
| } else { |
| addLoadEvent(function() { |
| scrollIntoView("packages-nav"); |
| scrollIntoView("classes-nav"); |
| }); |
| } |
| $("#swapper").css({borderBottom:"2px solid #aaa"}); |
| } else { |
| swapNav(); // tree view should be used on mobile |
| } |
| </script> |
| |
| |
| |
| <div class="g-unit" id="doc-content"> |
| |
| <div id="api-info-block"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="sum-details-links"> |
| |
| Summary: |
| |
| |
| |
| |
| |
| <a href="#constants">Constants</a> |
| |
| |
| |
| |
| |
| |
| |
| |
| | <a href="#pubmethods">Methods</a> |
| |
| |
| |
| |
| | <a href="#inhmethods">Inherited Methods</a> |
| |
| | <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> |
| |
| </div><!-- end sum-details-links --> |
| <div class="api-level"> |
| |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_1.0">API Level Guice_1.0</a> |
| |
| |
| |
| |
| |
| </div> |
| </div><!-- end api-info-block --> |
| |
| |
| <!-- ======== START OF CLASS DATA ======== --> |
| |
| <div id="jd-header"> |
| public |
| |
| |
| |
| class |
| <h1>ServletScopes</h1> |
| |
| |
| |
| |
| extends Object<br/> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </div><!-- end header --> |
| |
| <div id="naMessage"></div> |
| |
| <div id="jd-content" class="api apilevel-Guice_1.0"> |
| <table class="jd-inheritance-table"> |
| |
| |
| <tr> |
| |
| <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> |
| </tr> |
| |
| |
| <tr> |
| |
| <td class="jd-inheritance-space"> ↳</td> |
| |
| <td colspan="1" class="jd-inheritance-class-cell">com.google.inject.servlet.ServletScopes</td> |
| </tr> |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Class Overview</h2> |
| <p>Servlet scopes.</p> |
| |
| |
| |
| |
| |
| </div><!-- jd-descr --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Summary</h2> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_1.0" > |
| <td class="jd-typecol"><a href="../../../../com/google/inject/Scope.html">Scope</a></td> |
| <td class="jd-linkcol"><a href="../../../../com/google/inject/servlet/ServletScopes.html#REQUEST">REQUEST</a></td> |
| <td class="jd-descrcol" width="100%">HTTP servlet request scope.</td> |
| </tr> |
| |
| |
| <tr class=" api apilevel-Guice_1.0" > |
| <td class="jd-typecol"><a href="../../../../com/google/inject/Scope.html">Scope</a></td> |
| <td class="jd-linkcol"><a href="../../../../com/google/inject/servlet/ServletScopes.html#SESSION">SESSION</a></td> |
| <td class="jd-descrcol" width="100%">HTTP session scope.</td> |
| </tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_3.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| <T> |
| Callable<T></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../com/google/inject/servlet/ServletScopes.html#continueRequest(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)">continueRequest</a></span>(Callable<T> callable, Map<<a href="../../../../com/google/inject/Key.html">Key</a><?>, Object> seedMap)</nobr> |
| |
| <div class="jd-descrdiv">Wraps the given callable in a contextual callable that "continues" the |
| HTTP request in another thread.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-Guice_4.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../com/google/inject/servlet/ServletScopes.html#isRequestScoped(com.google.inject.Binding<?>)">isRequestScoped</a></span>(<a href="../../../../com/google/inject/Binding.html">Binding</a><?> binding)</nobr> |
| |
| <div class="jd-descrdiv">Returns true if <code>binding</code> is request-scoped.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-Guice_3.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| <T> |
| Callable<T></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../com/google/inject/servlet/ServletScopes.html#scopeRequest(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)">scopeRequest</a></span>(Callable<T> callable, Map<<a href="../../../../com/google/inject/Key.html">Key</a><?>, Object> seedMap)</nobr> |
| |
| <div class="jd-descrdiv">Scopes the given callable inside a request scope.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-Guice_4.0" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| static |
| <T> |
| Callable<T></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="../../../../com/google/inject/servlet/ServletScopes.html#transferRequest(java.util.concurrent.Callable<T>)">transferRequest</a></span>(Callable<T> callable)</nobr> |
| |
| <div class="jd-descrdiv">Wraps the given callable in a contextual callable that "transfers" the |
| request to another thread.</div> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="inhmethods" class="jd-sumtable"><tr><th> |
| <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| <div style="clear:left;">Inherited Methods</div></th></tr> |
| |
| |
| <tr class="api apilevel-" > |
| <td colspan="12"> |
| <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" |
| ><img id="inherited-methods-java.lang.Object-trigger" |
| src="../../../../../javadoc/assets/images/triangle-closed.png" |
| class="jd-expando-trigger-img" /></a> |
| From class |
| |
| java.lang.Object |
| |
| <div id="inherited-methods-java.lang.Object"> |
| <div id="inherited-methods-java.lang.Object-list" |
| class="jd-inheritedlinks"> |
| </div> |
| <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> |
| <table class="jd-sumtable-expando"> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| Object</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">clone</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">equals</span>(Object arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">finalize</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| Class<?></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">getClass</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">hashCode</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notify</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notifyAll</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">toString</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0, int arg1)</nobr> |
| |
| </td></tr> |
| |
| |
| </table> |
| </div> |
| </div> |
| </td></tr> |
| |
| |
| </table> |
| |
| |
| </div><!-- jd-descr (summary) --> |
| |
| <!-- Details --> |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- XML Attributes --> |
| |
| |
| <!-- Enum Values --> |
| |
| |
| <!-- Constants --> |
| |
| |
| <!-- ========= ENUM CONSTANTS DETAIL ======== --> |
| <h2>Constants</h2> |
| |
| |
| |
| |
| <A NAME="REQUEST"></A> |
| |
| <div class="jd-details api apilevel-Guice_1.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| final |
| <a href="../../../../com/google/inject/Scope.html">Scope</a> |
| </span> |
| REQUEST |
| </h4> |
| <div class="api-level"> |
| |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_1.0">API Level Guice_1.0</a> |
| |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>HTTP servlet request scope. |
| </p></div> |
| |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="SESSION"></A> |
| |
| <div class="jd-details api apilevel-Guice_1.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| final |
| <a href="../../../../com/google/inject/Scope.html">Scope</a> |
| </span> |
| SESSION |
| </h4> |
| <div class="api-level"> |
| |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_1.0">API Level Guice_1.0</a> |
| |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>HTTP session scope. |
| </p></div> |
| |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| <!-- Fields --> |
| |
| |
| <!-- Public ctors --> |
| |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <!-- Protected ctors --> |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| <!-- Public methdos --> |
| |
| <h2>Public Methods</h2> |
| |
| |
| |
| <A NAME="continueRequest(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_3.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| Callable<T> |
| </span> |
| <span class="sympad">continueRequest</span> |
| <span class="normal">(Callable<T> callable, Map<<a href="../../../../com/google/inject/Key.html">Key</a><?>, Object> seedMap)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_3.0">API Level Guice_3.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Wraps the given callable in a contextual callable that "continues" the |
| HTTP request in another thread. This acts as a way of transporting |
| request context data from the request processing thread to to worker |
| threads. |
| <p> |
| There are some limitations: |
| <ul> |
| <li>Derived objects (i.e. anything marked @RequestScoped will not be |
| transported.</li> |
| <li>State changes to the HttpServletRequest after this method is called |
| will not be seen in the continued thread.</li> |
| <li>Only the HttpServletRequest, ServletContext and request parameter |
| map are available in the continued thread. The response and session |
| are not available.</li> |
| </ul> |
| |
| <p>The returned callable will throw a <code><a href="../../../../com/google/inject/servlet/ScopingException.html">ScopingException</a></code> when called |
| if the HTTP request scope is still active on the current thread.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>callable</td> |
| <td>code to be executed in another thread, which depends on |
| the request scope.</td> |
| </tr> |
| <tr> |
| <th>seedMap</td> |
| <td>the initial set of scoped instances for Guice to seed the |
| request scope with. To seed a key with null, use <code>null</code> as |
| the value.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a callable that will invoke the given callable, making the request |
| context available to it.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="../../../../com/google/inject/OutOfScopeException.html">OutOfScopeException</a></td> |
| <td>if this method is called from a non-request |
| thread, or if the request has completed.</td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isRequestScoped(com.google.inject.Binding<?>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_4.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isRequestScoped</span> |
| <span class="normal">(<a href="../../../../com/google/inject/Binding.html">Binding</a><?> binding)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_4.0">API Level Guice_4.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns true if <code>binding</code> is request-scoped. If the binding is a |
| <code><a href="../../../../com/google/inject/spi/LinkedKeyBinding.html">linked key binding</a></code> and |
| belongs to an injector (i. e. it was retrieved via |
| <code><a href="../../../../com/google/inject/Injector.html#getBinding(com.google.inject.Key<T>)">Injector.getBinding()</a></code>), then this method will |
| also return true if the target binding is request-scoped. |
| </p></div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="scopeRequest(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_3.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| Callable<T> |
| </span> |
| <span class="sympad">scopeRequest</span> |
| <span class="normal">(Callable<T> callable, Map<<a href="../../../../com/google/inject/Key.html">Key</a><?>, Object> seedMap)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_3.0">API Level Guice_3.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Scopes the given callable inside a request scope. This is not the same |
| as the HTTP request scope, but is used if no HTTP request scope is in |
| progress. In this way, keys can be scoped as @RequestScoped and exist |
| in non-HTTP requests (for example: RPC requests) as well as in HTTP |
| request threads. |
| |
| <p>The returned callable will throw a <code><a href="../../../../com/google/inject/servlet/ScopingException.html">ScopingException</a></code> when called |
| if there is a request scope already active on the current thread.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>callable</td> |
| <td>code to be executed which depends on the request scope. |
| Typically in another thread, but not necessarily so.</td> |
| </tr> |
| <tr> |
| <th>seedMap</td> |
| <td>the initial set of scoped instances for Guice to seed the |
| request scope with. To seed a key with null, use <code>null</code> as |
| the value.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a callable that when called will run inside the a request scope |
| that exposes the instances in the <code>seedMap</code> as scoped keys.</li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="transferRequest(java.util.concurrent.Callable<T>)"></A> |
| |
| <div class="jd-details api apilevel-Guice_4.0"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| |
| |
| |
| Callable<T> |
| </span> |
| <span class="sympad">transferRequest</span> |
| <span class="normal">(Callable<T> callable)</span> |
| </h4> |
| <div class="api-level"> |
| <div> |
| |
| Since: <a href="../../../../guide/appendix/api-levels.html#levelGuice_4.0">API Level Guice_4.0</a> |
| |
| </div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Wraps the given callable in a contextual callable that "transfers" the |
| request to another thread. This acts as a way of transporting |
| request context data from the current thread to a future thread. |
| |
| <p>As opposed to <code><a href="../../../../com/google/inject/servlet/ServletScopes.html#continueRequest(java.util.concurrent.Callable<T>, java.util.Map<com.google.inject.Key<?>, java.lang.Object>)">continueRequest(Callable<T>, Map<Key<?>, Object>)</a></code>, this method propagates all |
| existing scoped objects. The primary use case is in server implementations |
| where you can detach the request processing thread while waiting for data, |
| and reattach to a different thread to finish processing at a later time. |
| |
| <p>Because <code>HttpServletRequest</code> objects are not typically |
| thread-safe, the callable returned by this method must not be run on a |
| different thread until the current request scope has terminated. In other |
| words, do not use this method to propagate the current request scope to |
| worker threads that may run concurrently with the current thread. |
| |
| <p>The returned callable will throw a <code><a href="../../../../com/google/inject/servlet/ScopingException.html">ScopingException</a></code> when called |
| if the request scope being transferred is still active on a different |
| thread.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>callable</td> |
| <td>code to be executed in another thread, which depends on |
| the request scope.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a callable that will invoke the given callable, making the request |
| context available to it.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="../../../../com/google/inject/OutOfScopeException.html">OutOfScopeException</a></td> |
| <td>if this method is called from a non-request |
| thread, or if the request has completed. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| |
| |
| |
| <!-- ========= END OF CLASS DATA ========= --> |
| <A NAME="navbar_top"></A> |
| |
| <div id="footer"> |
| Generated by <a href="http://code.google.com/p/doclava/">Doclava</a>. |
| </div> <!-- end footer --> |
| |
| </div> <!-- jd-content --> |
| |
| </div><!-- end doc-content --> |
| |
| </div> <!-- end body-content --> |
| |
| <script type="text/javascript"> |
| init(); /* initialize android-developer-docs.js */ |
| </script> |
| |
| </body> |
| </html> |