org.jboss.osgi.spi
Interface Attachments

All Known Subinterfaces:
Deployment, InvocationContext
All Known Implementing Classes:
AttachmentSupport

public interface Attachments

An interface for general Attachments

Since:
20-Apr-2007
Author:
Thomas.Diesler@jboss.com

Nested Class Summary
static class Attachments.Key
          A key for attachements
 
Method Summary
<T> T
addAttachment(Class<T> clazz, T value)
          Add arbitrary attachment
 Object addAttachment(String name, Object value)
          Add arbitrary attachment with name
<T> T
addAttachment(String name, T value, Class<T> clazz)
          Add arbitrary attachment with name
<T> T
getAttachment(Class<T> clazz)
          Get an arbitrary attachment
 Object getAttachment(String name)
          Get an arbitrary attachment
<T> T
getAttachment(String name, Class<T> clazz)
          Get an arbitrary attachment
 Collection<Attachments.Key> getAttachmentKeys()
          Get attachment keys
<T> T
removeAttachment(Class<T> clazz)
          Remove arbitrary attachments
<T> T
removeAttachment(Class<T> clazz, String name)
          Remove arbitrary attachments
 Object removeAttachment(String name)
          Remove arbitrary attachments
 

Method Detail

getAttachmentKeys

Collection<Attachments.Key> getAttachmentKeys()
Get attachment keys


addAttachment

<T> T addAttachment(Class<T> clazz,
                    T value)
Add arbitrary attachment


addAttachment

<T> T addAttachment(String name,
                    T value,
                    Class<T> clazz)
Add arbitrary attachment with name


addAttachment

Object addAttachment(String name,
                     Object value)
Add arbitrary attachment with name


getAttachment

<T> T getAttachment(Class<T> clazz)
Get an arbitrary attachment


getAttachment

<T> T getAttachment(String name,
                    Class<T> clazz)
Get an arbitrary attachment


getAttachment

Object getAttachment(String name)
Get an arbitrary attachment


removeAttachment

<T> T removeAttachment(Class<T> clazz)
Remove arbitrary attachments


removeAttachment

<T> T removeAttachment(Class<T> clazz,
                       String name)
Remove arbitrary attachments


removeAttachment

Object removeAttachment(String name)
Remove arbitrary attachments



Copyright © 2011. All Rights Reserved.