Home » xml-commons-external-1.4.01-src » javax » xml » rpc » handler » [javadoc | source]

    1   /*
    2    * JBoss, Home of Professional Open Source.
    3    * Copyright 2006, Red Hat Middleware LLC, and individual contributors
    4    * as indicated by the @author tags. See the copyright.txt file in the
    5    * distribution for a full listing of individual contributors.
    6    *
    7    * This is free software; you can redistribute it and/or modify it
    8    * under the terms of the GNU Lesser General Public License as
    9    * published by the Free Software Foundation; either version 2.1 of
   10    * the License, or (at your option) any later version.
   11    *
   12    * This software is distributed in the hope that it will be useful,
   13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15    * Lesser General Public License for more details.
   16    *
   17    * You should have received a copy of the GNU Lesser General Public
   18    * License along with this software; if not, write to the Free
   19    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21    */
   22   package javax.xml.rpc.handler;
   23   
   24   import java.util.Iterator;
   25   
   26   /** This interface abstracts the message context that is processed by a handler
   27    * in the handle method.
   28    * 
   29    * The MessageContext interface provides methods to manage a property set.
   30    * MessageContext properties enable handlers in a handler chain to share
   31    * processing related state. 
   32    * 
   33    * @author Scott.Stark@jboss.org
   34    * @author Rahul Sharma, Roberto Chinnici (javadoc)
   35    */
   36   public interface MessageContext
   37   {
   38      /**
   39       * Returns true if the MessageContext contains a property with the specified name.
   40       * @param name Name of the property whose presense is to be tested
   41       * @return Returns true if the MessageContext contains the property; otherwise false
   42       */
   43      public boolean containsProperty(String name);
   44   
   45      /**
   46       * Gets the value of a specific property from the MessageContext
   47       * @param name Name of the property whose value is to be retrieved
   48       * @return Value of the property
   49       * @throws IllegalArgumentException if an illegal property name is specified
   50       */
   51      public Object getProperty(String name);
   52   
   53      /**
   54       * Returns an Iterator view of the names of the properties in this MessageContext
   55       * @return Iterator for the property names
   56       */
   57      public Iterator getPropertyNames();
   58   
   59      /**
   60       * Removes a property (name-value pair) from the MessageContext
   61       * @param name Name of the property to be removed
   62       * @throws IllegalArgumentException if an illegal property name is specified
   63       */
   64      public void removeProperty(String name);
   65   
   66      /**
   67       * Sets the name and value of a property associated with the MessageContext.
   68       * If the MessageContext contains a value of the same property, the old value is replaced.
   69       * @param name Name of the property associated with the MessageContext
   70       * @param value Value of the property
   71       * @throws IllegalArgumentException If some aspect of the property is prevents it from being stored in the context
   72       * @throws UnsupportedOperationException If this method is not supported.
   73       */
   74      public void setProperty(String name, Object value);
   75   }

Home » xml-commons-external-1.4.01-src » javax » xml » rpc » handler » [javadoc | source]