All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.webservices.api.message.DistributedPropertySet Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
/*
 * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

package com.oracle.webservices.api.message;

import java.util.Map;

import com.sun.istack.Nullable;

/**
 * {@link PropertySet} that combines properties exposed from multiple
 * {@link PropertySet}s into one.
 *
 * 

* This implementation allows one {@link PropertySet} to assemble * all properties exposed from other "satellite" {@link PropertySet}s. * (A satellite may itself be a {@link DistributedPropertySet}, so * in general this can form a tree.) * *

* This is useful for JAX-WS because the properties we expose to the application * are contributed by different pieces, and therefore we'd like each of them * to have a separate {@link PropertySet} implementation that backs up * the properties. For example, this allows FastInfoset to expose its * set of properties to {@link RequestContext} by using a strongly-typed fields. * *

* This is also useful for a client-side transport to expose a bunch of properties * into {@link ResponseContext}. It simply needs to create a {@link PropertySet} * object with methods for each property it wants to expose, and then add that * {@link PropertySet} to {@link Packet}. This allows property values to be * lazily computed (when actually asked by users), thus improving the performance * of the typical case where property values are not asked. * *

* A similar benefit applies on the server-side, for a transport to expose * a bunch of properties to {@link WebServiceContext}. * *

* To achieve these benefits, access to {@link DistributedPropertySet} is slower * compared to {@link PropertySet} (such as get/set), while adding a satellite * object is relatively fast. * * @author Kohsuke Kawaguchi */ public interface DistributedPropertySet extends com.oracle.webservices.api.message.PropertySet { public @Nullable T getSatellite(Class satelliteClass); public Map, com.oracle.webservices.api.message.PropertySet> getSatellites(); public void addSatellite(com.oracle.webservices.api.message.PropertySet satellite); public void addSatellite(Class keyClass, com.oracle.webservices.api.message.PropertySet satellite); public void removeSatellite(com.oracle.webservices.api.message.PropertySet satellite); public void copySatelliteInto(com.oracle.webservices.api.message.MessageContext r); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy