Package org.apache.camel.attachment
Class DefaultAttachment
java.lang.Object
org.apache.camel.attachment.DefaultAttachment
- All Implemented Interfaces:
Attachment
-
Constructor Summary
ConstructorDescriptionDefaultAttachment
(jakarta.activation.DataHandler dh) DefaultAttachment
(jakarta.activation.DataSource ds) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add this value to the existing values for this headerName.void
boolean
jakarta.activation.DataHandler
Return a DataHandler for the content within this attachment.Get all the headers for this header name.getHeaderAsList
(String name) Get all the headers for this header name.Get all header names for this attachment.int
hashCode()
void
removeHeader
(String headerName) Remove all headers with this name.void
Set the value for this headerName.
-
Constructor Details
-
DefaultAttachment
public DefaultAttachment(jakarta.activation.DataHandler dh) -
DefaultAttachment
public DefaultAttachment(jakarta.activation.DataSource ds)
-
-
Method Details
-
getDataHandler
public jakarta.activation.DataHandler getDataHandler()Description copied from interface:Attachment
Return a DataHandler for the content within this attachment.- Specified by:
getDataHandler
in interfaceAttachment
- Returns:
- DataHandler for the content
-
getHeader
Description copied from interface:Attachment
Get all the headers for this header name. Returns null if no headers for this header name are available.- Specified by:
getHeader
in interfaceAttachment
- Parameters:
name
- he name of this header- Returns:
- a comma separated list of all header values
-
getHeaderAsList
Description copied from interface:Attachment
Get all the headers for this header name. Returns null if no headers for this header name are available.- Specified by:
getHeaderAsList
in interfaceAttachment
- Parameters:
name
- The name of this header- Returns:
- a list of all header values
-
addHeader
Description copied from interface:Attachment
Add this value to the existing values for this headerName.- Specified by:
addHeader
in interfaceAttachment
- Parameters:
headerName
- the name of this headerheaderValue
- the value for this header
-
setHeader
Description copied from interface:Attachment
Set the value for this headerName. Replaces all existing header values with this new value.- Specified by:
setHeader
in interfaceAttachment
- Parameters:
headerName
- the name of this headerheaderValue
- the value for this header
-
removeHeader
Description copied from interface:Attachment
Remove all headers with this name.- Specified by:
removeHeader
in interfaceAttachment
- Parameters:
headerName
- the name of this header
-
getHeaderNames
Description copied from interface:Attachment
Get all header names for this attachment.- Specified by:
getHeaderNames
in interfaceAttachment
- Returns:
- a collection of all header names
-
clearHeaders
public void clearHeaders() -
equals
-
hashCode
public int hashCode()
-