Package org.apache.camel.attachment
Class DefaultAttachment
java.lang.Object
org.apache.camel.attachment.DefaultAttachment
- All Implemented Interfaces:
Attachment
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAttachment(jakarta.activation.DataHandler dh) DefaultAttachment(jakarta.activation.DataSource ds) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd this value to the existing values for this header.voidbooleanjakarta.activation.DataHandlerReturn 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.inthashCode()voidremoveHeader(String name) Remove all headers with this name.voidSet the value for this header.
-
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:AttachmentReturn a DataHandler for the content within this attachment.- Specified by:
getDataHandlerin interfaceAttachment- Returns:
- DataHandler for the content
-
getHeader
Description copied from interface:AttachmentGet all the headers for this header name. Returns null if no headers for this header name are available.- Specified by:
getHeaderin interfaceAttachment- Parameters:
name- the name of this header- Returns:
- a comma separated list of all header values
-
getHeaderAsList
Description copied from interface:AttachmentGet all the headers for this header name. Returns null if no headers for this header name are available.- Specified by:
getHeaderAsListin interfaceAttachment- Parameters:
name- the name of this header- Returns:
- a list of all header values
-
addHeader
Description copied from interface:AttachmentAdd this value to the existing values for this header.- Specified by:
addHeaderin interfaceAttachment- Parameters:
name- the name of this headervalue- the value for this header
-
setHeader
Description copied from interface:AttachmentSet the value for this header. Replaces any existing header with the same name.- Specified by:
setHeaderin interfaceAttachment- Parameters:
headerName- the name of this headervalue- the value for this header
-
removeHeader
Description copied from interface:AttachmentRemove all headers with this name.- Specified by:
removeHeaderin interfaceAttachment- Parameters:
name- the name of this header
-
getHeaderNames
Description copied from interface:AttachmentGet all header names for this attachment.- Specified by:
getHeaderNamesin interfaceAttachment- Returns:
- a collection of all header names
-
clearHeaders
public void clearHeaders() -
equals
-
hashCode
public int hashCode()
-