public class SelectByHeader extends java.lang.Object implements PartSelector
PartSelector
implementation that parses a specific header examining the value to see if it matches the configured regular
expression.In the adapter configuration file this class is aliased as mime-select-by-header which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
SelectByHeader() |
SelectByHeader(java.lang.String header,
java.lang.String regexp) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeaderName() |
java.lang.String |
getHeaderValueRegExp() |
javax.mail.internet.MimeBodyPart |
select(BodyPartIterator m)
Select the body part that should form the AdaptrisMessage payload.
|
java.util.List<javax.mail.internet.MimeBodyPart> |
select(javax.mail.internet.MimeMultipart in)
Select the body part that should form the AdaptrisMessage payload.
|
void |
setHeaderName(java.lang.String s)
Specify the header name whose value will be examined .
|
void |
setHeaderValueRegExp(java.lang.String s)
Set the value of the regular expression that will be used to match against
the header value.
|
public SelectByHeader()
public SelectByHeader(java.lang.String header, java.lang.String regexp)
public javax.mail.internet.MimeBodyPart select(BodyPartIterator m) throws javax.mail.MessagingException
PartSelector
select
in interface PartSelector
javax.mail.MessagingException
public java.util.List<javax.mail.internet.MimeBodyPart> select(javax.mail.internet.MimeMultipart in) throws javax.mail.MessagingException
PartSelector
select
in interface PartSelector
in
- a MimeMultipartjavax.mail.MessagingException
public java.lang.String getHeaderName()
public void setHeaderName(java.lang.String s)
s
- the headerName to set, e.g. "Content-Type"public java.lang.String getHeaderValueRegExp()
public void setHeaderValueRegExp(java.lang.String s)
s
- the headerValueRegExp to set