blob: 84c1fd5ed6b3b67bf2904e16e6db1d9985e27991 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Handler (Apache Axis)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Handler (Apache Axis)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Handler.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../javax/xml/rpc/handler/GenericHandler.html" title="class in javax.xml.rpc.handler"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../javax/xml/rpc/handler/HandlerChain.html" title="interface in javax.xml.rpc.handler"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?javax/xml/rpc/handler/Handler.html" target="_top">Frames</a></li>
<li><a href="Handler.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javax.xml.rpc.handler</div>
<h2 title="Interface Handler" class="title">Interface Handler</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../javax/xml/rpc/handler/GenericHandler.html" title="class in javax.xml.rpc.handler">GenericHandler</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">Handler</span></pre>
<div class="block">The <code>javax.xml.rpc.handler.Handler</code> interface is
required to be implemented by a SOAP message handler. The
<code>handleRequest</code>, <code>handleResponse</code>
and <code>handleFault</code> methods for a SOAP message
handler get access to the <code>SOAPMessage</code> from the
<code>SOAPMessageContext</code>. The implementation of these
methods can modify the <code>SOAPMessage</code> including the
headers and body elements.</div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>1.0</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#destroy()">destroy</a></strong>()</code>
<div class="block">The <code>destroy</code> method indicates the end of lifecycle
for a Handler instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../javax/xml/namespace/QName.html" title="class in javax.xml.namespace">QName</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#getHeaders()">getHeaders</a></strong>()</code>
<div class="block">Gets the header blocks processed by this Handler instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#handleFault(javax.xml.rpc.handler.MessageContext)">handleFault</a></strong>(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</code>
<div class="block">The <code>handleFault</code> method processes the SOAP faults
based on the SOAP message processing model.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#handleRequest(javax.xml.rpc.handler.MessageContext)">handleRequest</a></strong>(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</code>
<div class="block">The <code>handleRequest</code> method processes the request message.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#handleResponse(javax.xml.rpc.handler.MessageContext)">handleResponse</a></strong>(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</code>
<div class="block">The <code>handleResponse</code> method processes the response SOAP message.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../javax/xml/rpc/handler/Handler.html#init(javax.xml.rpc.handler.HandlerInfo)">init</a></strong>(<a href="../../../../javax/xml/rpc/handler/HandlerInfo.html" title="class in javax.xml.rpc.handler">HandlerInfo</a>&nbsp;config)</code>
<div class="block">The <code>init</code> method enables the Handler instance to
initialize itself.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="handleRequest(javax.xml.rpc.handler.MessageContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleRequest</h4>
<pre>boolean&nbsp;handleRequest(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</pre>
<div class="block">The <code>handleRequest</code> method processes the request message.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>context</code> - MessageContext parameter provides access to the request
message.</dd>
<dt><span class="strong">Returns:</span></dt><dd>boolean boolean Indicates the processing mode
<ul>
<li>Return <code>true</code> to indicate continued
processing of the request handler chain. The
<code>HandlerChain</code>
takes the responsibility of invoking the next
entity. The next entity may be the next handler
in the <code>HandlerChain</code> or if this
handler is the last handler in the chain, the
next entity is the service endpoint object.
<li>Return <code>false</code> to indicate blocking
of the request handler chain. In this case,
further processing of the request handler chain
is blocked and the target service endpoint is
not dispatched. The JAX-RPC runtime system takes
the responsibility of invoking the response
handler chain next with the SOAPMessageContext.
The Handler implementation class has the the
responsibility of setting the appropriate response
SOAP message in either handleRequest and/or
handleResponse method. In the default processing
model, the response handler chain starts processing
from the same Handler instance (that returned false)
and goes backward in the execution sequence.
</ul></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../javax/xml/rpc/JAXRPCException.html" title="class in javax.xml.rpc">JAXRPCException</a></code> - indicates a handler-specific
runtime error. If <code>JAXRPCException</code> is thrown
by a handleRequest method, the HandlerChain
terminates the further processing of this handler
chain. On the server side, the HandlerChain
generates a SOAP fault that indicates that the
message could not be processed for reasons not
directly attributable to the contents of the
message itself but rather to a runtime error
during the processing of the message. On the
client side, the exception is propagated to
the client code</dd>
<dd><code><a href="../../../../javax/xml/rpc/soap/SOAPFaultException.html" title="class in javax.xml.rpc.soap">SOAPFaultException</a></code> - indicates a SOAP fault. The Handler
implementation class has the the responsibility
of setting the SOAP fault in the SOAP message in
either handleRequest and/or handleFault method.
If SOAPFaultException is thrown by a server-side
request handler's handleRequest method, the
HandlerChain terminates the further processing
of the request handlers in this handler chain
and invokes the handleFault method on the
HandlerChain with the SOAP message context. Next,
the HandlerChain invokes the handleFault method
on handlers registered in the handler chain,
beginning with the Handler instance that threw
the exception and going backward in execution. The
client-side request handler's handleRequest method
should not throw the SOAPFaultException.</dd></dl>
</li>
</ul>
<a name="handleResponse(javax.xml.rpc.handler.MessageContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleResponse</h4>
<pre>boolean&nbsp;handleResponse(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</pre>
<div class="block">The <code>handleResponse</code> method processes the response SOAP message.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>context</code> - MessageContext parameter provides access to
the response SOAP message</dd>
<dt><span class="strong">Returns:</span></dt><dd>boolean Indicates the processing mode
<ul>
<li>Return <code>true</code> to indicate continued
processing ofthe response handler chain. The
HandlerChain invokes the <code>handleResponse</code>
method on the next <code>Handler</code> in
the handler chain.
<li>Return <code>false</code> to indicate blocking
of the response handler chain. In this case, no
other response handlers in the handler chain
are invoked.
</ul></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../javax/xml/rpc/JAXRPCException.html" title="class in javax.xml.rpc">JAXRPCException</a></code> - indicates a handler specific runtime error.
If JAXRPCException is thrown by a handleResponse
method, the HandlerChain terminates the further
processing of this handler chain. On the server side,
the HandlerChain generates a SOAP fault that
indicates that the message could not be processed
for reasons not directly attributable to the contents
of the message itself but rather to a runtime error
during the processing of the message. On the client
side, the runtime exception is propagated to the
client code.</dd></dl>
</li>
</ul>
<a name="handleFault(javax.xml.rpc.handler.MessageContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleFault</h4>
<pre>boolean&nbsp;handleFault(<a href="../../../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</a>&nbsp;context)</pre>
<div class="block">The <code>handleFault</code> method processes the SOAP faults
based on the SOAP message processing model.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>context</code> - MessageContext parameter provides access to
the SOAP message</dd>
<dt><span class="strong">Returns:</span></dt><dd>boolean Indicates the processing mode
<ul>
<li>Return <code>true</code> to indicate continued
processing of SOAP Fault. The HandlerChain invokes
the <code>handleFault</code> method on the
next <code>Handler</code> in the handler chain.
<li>Return <code>false</code> to indicate end
of the SOAP fault processing. In this case, no
other handlers in the handler chain
are invoked.
</ul></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../javax/xml/rpc/JAXRPCException.html" title="class in javax.xml.rpc">JAXRPCException</a></code> - indicates handler specific runtime
error. If JAXRPCException is thrown by a handleFault
method, the HandlerChain terminates the further
processing of this handler chain. On the server side,
the HandlerChain generates a SOAP fault that
indicates that the message could not be processed
for reasons not directly attributable to the contents
of the message itself but rather to a runtime error
during the processing of the message. On the client
side, the JAXRPCException is propagated to the
client code.</dd></dl>
</li>
</ul>
<a name="init(javax.xml.rpc.handler.HandlerInfo)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>void&nbsp;init(<a href="../../../../javax/xml/rpc/handler/HandlerInfo.html" title="class in javax.xml.rpc.handler">HandlerInfo</a>&nbsp;config)</pre>
<div class="block">The <code>init</code> method enables the Handler instance to
initialize itself. The <code>init</code> method passes the
handler configuration as a <code>HandlerInfo</code> instance.
The HandlerInfo is used to configure the Handler (for example:
setup access to an external resource or service) during the
initialization.
<p>
In the init method, the Handler class may get access to
any resources (for example; access to a logging service or
database) and maintain these as part of its instance variables.
Note that these instance variables must not have any state
specific to the SOAP message processing performed in the
various handle method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>config</code> - HandlerInfo configuration for the initialization of this
handler</dd><dd><code>config</code> - </dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../javax/xml/rpc/JAXRPCException.html" title="class in javax.xml.rpc">JAXRPCException</a></code> - if initialization of the handler
fails</dd></dl>
</li>
</ul>
<a name="destroy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>destroy</h4>
<pre>void&nbsp;destroy()</pre>
<div class="block">The <code>destroy</code> method indicates the end of lifecycle
for a Handler instance. The Handler implementation class should
release its resources and perform cleanup in the implementation
of the <code>destroy</code> method.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../javax/xml/rpc/JAXRPCException.html" title="class in javax.xml.rpc">JAXRPCException</a></code> - if there was any error during
destroy</dd></dl>
</li>
</ul>
<a name="getHeaders()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getHeaders</h4>
<pre><a href="../../../../javax/xml/namespace/QName.html" title="class in javax.xml.namespace">QName</a>[]&nbsp;getHeaders()</pre>
<div class="block">Gets the header blocks processed by this Handler instance.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Array of QNames of header blocks processed by this
handler instance. <code>QName</code> is the qualified
name of the outermost element of the Header block.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Handler.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../javax/xml/rpc/handler/GenericHandler.html" title="class in javax.xml.rpc.handler"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../javax/xml/rpc/handler/HandlerChain.html" title="interface in javax.xml.rpc.handler"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?javax/xml/rpc/handler/Handler.html" target="_top">Frames</a></li>
<li><a href="Handler.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>