Class ProtonAttachments
- java.lang.Object
- 
- org.apache.qpid.protonj2.engine.impl.ProtonAttachments
 
- 
- All Implemented Interfaces:
- Attachments
 
 public class ProtonAttachments extends java.lang.Object implements Attachments Proton implementation of an Attachments object.
- 
- 
Constructor SummaryConstructors Constructor Description ProtonAttachments()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Attachmentsclear()booleancontainsKey(java.lang.String key)Checks if the given key has a value mapped to it in thisAttachmentsinstance.<T> Tget(java.lang.String key)Gets the user attached value that is associated with the given key, or null if no data is mapped to the key.<T> Tget(java.lang.String key, java.lang.Class<T> typeClass)Gets the user setAttachmentsvalue that is associated with the given key, or null if no data is mapped to the key.ProtonAttachmentsset(java.lang.String key, java.lang.Object value)Maps a given object to the given key in thisAttachmentsinstance.
 
- 
- 
- 
Method Detail- 
getpublic <T> T get(java.lang.String key) Description copied from interface:AttachmentsGets the user attached value that is associated with the given key, or null if no data is mapped to the key.- Specified by:
- getin interface- Attachments
- Type Parameters:
- T- The type to cast the attached mapped value to if one is set.
- Parameters:
- key- The key to use to lookup the mapped data.
- Returns:
- the object associated with the given key in this Attachmentsinstance.
 
 - 
getpublic <T> T get(java.lang.String key, java.lang.Class<T> typeClass)Description copied from interface:AttachmentsGets the user setAttachmentsvalue that is associated with the given key, or null if no data is mapped to the key.- Specified by:
- getin interface- Attachments
- Type Parameters:
- T- The type to cast the attached mapped value to if one is set.
- Parameters:
- key- The key to use to lookup the mapped data.
- typeClass- The Class that will be used when casting the returned mapped object.
- Returns:
- the object associated with the given key in this Attachmentsinstance.
 
 - 
setpublic ProtonAttachments set(java.lang.String key, java.lang.Object value) Description copied from interface:AttachmentsMaps a given object to the given key in thisAttachmentsinstance.- Specified by:
- setin interface- Attachments
- Parameters:
- key- The key to assign the value to
- value- The value to map to the given key.
- Returns:
- this Attachmentsinstance.
 
 - 
containsKeypublic boolean containsKey(java.lang.String key) Description copied from interface:AttachmentsChecks if the given key has a value mapped to it in thisAttachmentsinstance.- Specified by:
- containsKeyin interface- Attachments
- Parameters:
- key- The key to search for a mapping to in this- Attachmentsinstance.
- Returns:
- true if there is a value mapped to the given key in this Attachmentsinstance.
 
 - 
clearpublic Attachments clear() - Specified by:
- clearin interface- Attachments
- Returns:
- this Attachmentsinstance with all mapped values and the linked resource cleared.
 
 
- 
 
-