PageRenderTime 92ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/geronimo-jaxrpc_1.1_spec-2.1/src/main/java/javax/xml/rpc/handler/HandlerChain.java

#
Java | 124 lines | 12 code | 11 blank | 101 comment | 0 complexity | a495e3b9b19d1811d243621a2ea6897c MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. package javax.xml.rpc.handler;
  20. import java.util.List;
  21. import java.util.Map;
  22. /**
  23. * The <code>javax.xml.rpc.handler.HandlerChain</code> represents
  24. * a list of handlers. All elements in the HandlerChain are of
  25. * the type <code>javax.xml.rpc.handler.Handler</code>.
  26. * <p>
  27. * An implementation class for the <code>HandlerChain</code>
  28. * interface abstracts the policy and mechanism for the invocation
  29. * of the registered handlers.
  30. *
  31. * @version $Rev: 467553 $ $Date: 2006-10-25 00:01:51 -0400 (Wed, 25 Oct 2006) $
  32. */
  33. public interface HandlerChain extends List {
  34. /**
  35. * The <code>handleRequest</code> method initiates the request
  36. * processing for this handler chain.
  37. * @param context MessageContext parameter provides access to
  38. * the request SOAP message.
  39. * @return boolean Returns <code>true</code> if all handlers in
  40. * chain have been processed. Returns <code>false</code>
  41. *
  42. * if a handler in the chain returned
  43. * <code>false</code> from its handleRequest
  44. * method.
  45. * @throws javax.xml.rpc.JAXRPCException if any processing error happens
  46. */
  47. public boolean handleRequest(MessageContext context);
  48. /**
  49. * The <code>handleResponse</code> method initiates the response
  50. * processing for this handler chain.
  51. *
  52. * @param context MessageContext parameter provides access to the response
  53. * SOAP message.
  54. * @return boolean Returns <code>true</code> if all handlers in
  55. * chain have been processed. Returns <code>false</code>
  56. * if a handler in the chain returned
  57. * <code>false</code> from its handleResponse method.
  58. * @throws javax.xml.rpc.JAXRPCException if any processing error happens
  59. */
  60. public boolean handleResponse(MessageContext context);
  61. /**
  62. * The <code>handleFault</code> method initiates the SOAP
  63. * fault processing for this handler chain.
  64. *
  65. * @param context MessageContext parameter provides access to the SOAP
  66. * message.
  67. * @return Returns boolean Returns <code>true</code> if all handlers in
  68. * chain have been processed. Returns <code>false</code>
  69. * if a handler in the chain returned
  70. * <code>false</code> from its handleFault method.
  71. * @throws javax.xml.rpc.JAXRPCException if any processing error happens
  72. */
  73. public boolean handleFault(MessageContext context);
  74. /**
  75. * Initializes the configuration for a HandlerChain.
  76. *
  77. * @param config Configuration for the initialization of this handler
  78. * chain
  79. *
  80. * @throws javax.xml.rpc.JAXRPCException if there is any error that prevents
  81. * initialization
  82. */
  83. public void init(Map config);
  84. /**
  85. * Indicates the end of lifecycle for a HandlerChain.
  86. *
  87. * @throws javax.xml.rpc.JAXRPCException if there was any error that
  88. * prevented destroy from completing
  89. */
  90. public void destroy();
  91. /**
  92. * Sets SOAP Actor roles for this <code>HandlerChain</code>. This
  93. * specifies the set of roles in which this HandlerChain is to act
  94. * for the SOAP message processing at this SOAP node. These roles
  95. * assumed by a HandlerChain must be invariant during the
  96. * processing of an individual SOAP message through the HandlerChain.
  97. * <p>
  98. * A <code>HandlerChain</code> always acts in the role of the
  99. * special SOAP actor <code>next</code>. Refer to the SOAP
  100. * specification for the URI name for this special SOAP actor.
  101. * There is no need to set this special role using this method.
  102. *
  103. * @param soapActorNames URIs for SOAP actor name
  104. */
  105. public void setRoles(String[] soapActorNames);
  106. /**
  107. * Gets SOAP actor roles registered for this HandlerChain at
  108. * this SOAP node. The returned array includes the special
  109. * SOAP actor <code>next</code>.
  110. * @return String[] SOAP Actor roles as URIs
  111. */
  112. public java.lang.String[] getRoles();
  113. }