Home All Groups
jbossws-spi / org / jboss / wsf / spi / deployment / AbstractExtensible.html /
org.jboss.wsf.spi.deployment

Class AbstractExtensible

  • All Implemented Interfaces:
    Extensible
    Direct Known Subclasses:
    InvocationContext

    public abstract class AbstractExtensible
    extends Object
    implements Extensible
    A general extendible artifact; please note the 'attachments' and 'properties' fields are not meant to be modified concurrently, as they are initialied to plain HashMap instances. Extensions of this class should override the methods accessing those fields and add synchronized keyword. Most of the time, though, there will only be a single thread writing/deleting stuff in this class at the same time, for example because that only happens during deployment processing (which executes in the same thread for deployment processors / aspects and only the last aspect installs a service for each endpoint that run very limited stuff in different threads). Visibility is ensured by the fields being final.
    Since:
    20-Apr-2007
    Author:
    [email protected], [email protected]
    • Constructor Detail

      • AbstractExtensible

        public AbstractExtensible()
      • AbstractExtensible

        public AbstractExtensible(int initialAttachmentsSize,
                                  int initialPropertiesSize)
    • Method Detail

      • getAttachment

        public <T> T getAttachment(Class<T> clazz)
        Description copied from interface: Extensible
        Get an arbitrary attachment
        Specified by:
        getAttachment in interface  Extensible
        Type Parameters:
        T - class type of attachments
        Parameters:
        clazz - identifier
        Returns:
        attachment found
      • addAttachment

        public <T> T addAttachment(Class<T> clazz,
                                   Object obj)
        Description copied from interface: Extensible
        Add arbitrary attachments
        Specified by:
        addAttachment in interface  Extensible
        Type Parameters:
        T - class type
        Parameters:
        clazz - identifier
        obj - value
        Returns:
        added attachment
      • removeAttachment

        public <T> T removeAttachment(Class<T> key)
        Description copied from interface: Extensible
        Remove arbitrary attachments
        Specified by:
        removeAttachment in interface  Extensible
        Type Parameters:
        T - class type of attachments
        Parameters:
        key - identifier
        Returns:
        attachment removed
      • getProperties

        public Set<String> getProperties()
        Description copied from interface: Extensible
        Get the set of property names
        Specified by:
        getProperties in interface  Extensible
        Returns:
        set of property values
      • getProperty

        public Object getProperty(String key)
        Description copied from interface: Extensible
        Get an property
        Specified by:
        getProperty in interface  Extensible
        Parameters:
        key - property identifier
        Returns:
        found property
      • removeProperty

        public void removeProperty(String key)
        Description copied from interface: Extensible
        Remove a property
        Specified by:
        removeProperty in interface  Extensible
        Parameters:
        key - property identifier
      • setProperty

        public void setProperty(String key,
                                Object value)
        Description copied from interface: Extensible
        Set a property
        Specified by:
        setProperty in interface  Extensible
        Parameters:
        key - property identifier
        value - property value

Copyright © 2020 JBoss, by Red Hat. All rights reserved.