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

    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    *
    4    * Copyright 2000-2007 Sun Microsystems, Inc. All rights reserved. 
    5    *
    6    * The contents of this file are subject to the terms of either the GNU
    7    * General Public License Version 2 only ("GPL") or the Common Development
    8    * and Distribution License ("CDDL") (collectively, the "License").  You may
    9    * not use this file except in compliance with the License.  You can obtain
   10    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   11    * or mq/legal/LICENSE.txt.  See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    * 
   14    * When distributing the software, include this License Header Notice in each
   15    * file and include the License file at mq/legal/LICENSE.txt.  Sun designates
   16    * this particular file as subject to the "Classpath" exception as provided by
   17    * Sun in the GPL Version 2 section of the License file that accompanied this
   18    * code.  If applicable, add the following below the License Header, with the
   19    * fields enclosed by brackets [] replaced by your own identifying information:
   20    * "Portions Copyrighted [year] [name of copyright owner]"
   21    * 
   22    * Contributor(s):
   23    * 
   24    * If you wish your version of this file to be governed by only the CDDL or
   25    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   26    * elects to include this software in this distribution under the [CDDL or GPL
   27    * Version 2] license."  If you don't indicate a single choice of license, a
   28    * recipient has the option to distribute your version of this file under
   29    * either the CDDL, the GPL Version 2 or  to extend the choice of license to
   30    * its licensees as provided above.  However, if you add GPL Version 2 code
   31    * and therefore, elected the GPL Version 2 license, then the option applies
   32    * only if the new code is made subject to such option by the copyright holder. 
   33    */
   34   
   35   /*
   36    * @(#)Endpoint.java	1.3 07/02/07
   37    */ 
   38   
   39   package javax.xml.messaging;
   40   
   41   /**
   42    * An opaque representation of an application endpoint. Typically, an
   43    * <code>Endpoint</code> object represents a business entity, but it
   44    * may represent a party of any sort. Conceptually, an 
   45    * <code>Endpoint</code> object is the mapping of a logical name
   46    * (example, a URI) to a physical location, such as a URL.
   47    * <P>
   48    * For messaging using a provider that supports profiles, an application
   49    * does not need to specify an endpoint when it sends a message because 
   50    * destination information will be contained in the profile-specific header.
   51    * However, for point-to-point plain SOAP messaging, an application must supply
   52    * an <code>Endpoint</code> object to
   53    * the <code>SOAPConnection</code> method <code>call</code>
   54    * to indicate the intended destination for the message. 
   55    * The subclass {@link URLEndpoint} can be used when an application
   56    * wants to send a message directly to a remote party without using a
   57    * messaging provider.
   58    * <P>
   59    * The default identification for an <code>Endpoint</code> object
   60    * is a URI. This defines what JAXM messaging
   61    * providers need to support at minimum for identification of
   62    * destinations. A messaging provider
   63    * needs to be configured using a deployment-specific mechanism with
   64    * mappings from an endpoint to the physical details of that endpoint. 
   65    * <P>
   66    * <code>Endpoint</code> objects can be created using the constructor, or
   67    * they can be looked up in a naming
   68    * service. The latter is more flexible because logical identifiers
   69    * or even other naming schemes (such as DUNS numbers)
   70    * can be bound and rebound to specific URIs. 
   71    */
   72   public class Endpoint {
   73      /**
   74       * A string that identifies the party that this <code>Endpoint</code>
   75       * object represents; a URI is the default.
   76       */
   77       protected String id;
   78       
   79       /**
   80        * Constructs an <code>Endpoint</code> object using the given
   81        * string identifier.
   82        * 
   83        * @param uri a string that identifies the party that this
   84        *        <code>Endpoint</code> object represents; the default
   85        *        is a URI
   86        */
   87       public Endpoint(String uri) {
   88   	this.id = uri;
   89       }
   90       
   91       /**
   92        * Retrieves a string representation of this <code>Endpoint</code>
   93        * object.  This string is likely to be provider-specific, and
   94        * programmers are discouraged from parsing and programmatically
   95        * interpreting the contents of this string.
   96        *
   97        * @return a <code>String</code> with a provider-specific representation
   98        *         of this <code>Endpoint</code> object
   99        */
  100       public String toString() {
  101           return id;
  102       }
  103   }

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