Download Java X.400 API - PDF

Document related concepts
no text concepts found
Transcript
This is the specification for Isode's High Level X.400 Java Client API (HLXJA)
This API is an extension of the existing X.400 Java API, which in turn uses the X.400 C API. The goal of this
API is to allow developers to easily build X.400 User Agents (UAs).
The main characteristics of this API are:
•
use of standard Java setters and getters to make programming X.400 UAs more intuitive
•
consistent exception handling
•
capable of using P3 or P7
•
compatible with the existing X.400 Java API, so that the same objects can be used for lower level API
access if needed
HLXJA can be used to connect to either an X.400 MTAs via P3 or to an X.400 Message Store via P7. In
most cases client applications can be written to so that most of the code is the same, independently of the
protocol being used. However, there are operations like P7 Summarize that only apply to P7 connections.
The documentation makes clear those cases when the protocol being used affects functionality.
Writing an application which uses HLXJA
Client applications will typically follow this this basic structure (see the sections below):
•
•
Create bind session objects corresponding to the messaging servers that will be used
Send or receive messages
•
Unbind from the messaging server
Session objects
The session classes P3BindSession and P7BindSession are used to encapsulate information about a
connection.
P3BindSession objects are constructed by specifying three parameters: the presentation address of an
MTA's P3 channel, the O/R address of the user and the password of the user. The Presentation Address is
a String that may be an RFC 1278 format presentation address (for example,
"593"/Internet=server.host.net+102).
P7BindSession objects are constructed by specifying three parameters: the presentation address of an P7
Message Store, the O/R address of the user and the password of the user. The Presentation Address of the
P7 Message Store is a String that may be an RFC 1278 format presentation address (for example,
"3001"/Internet=server.host.net+3001).
Having created a session object, an application will use the bind() methods to bind to the server.
Sending and receiving messages
Included in this API there are a couple of examples on how to send X.400 messages
(com.isode.x400.highlevel.test.SendX400Mail.java) and to receive X.400 messages
(com.isode.x400.highlevel.test.ReceiveX400Mail.java)
Unbinding from a server
The unbind() method is used to unbind from server. Normally an application will bind to a server and keep
the connection open sending and or receiving messages with the same session. It is good practice for
applications to unbind once they no longer require a connected session, as otherwise errors will be logged
by the server.
Exceptions
The HLXJA uses X400APIExceptions to report errors which are likely to be caught and handled by user
code. For example, an attempt to bind to a message store that is not running will result in a {@link
com.isode.x400.highlevel.NotBoundException} being thrown.
Multi-threaded applications
Just like the X.400 Java API, the HLXJA is designed to be used with a multi-threaded process, and a
process may have multiple associations. However, each association must only be accessed by a single
thread.
Building and Deploying an application which uses the High Level
X.400 Java Client API
The HLXJA class library is contained inside isode-hlxja.jar, which by default is installed, along with
various other class libraries, in the directory (LIBDIR)/java/classes. To compile an application which
uses HLXJA, you must ensure that isode-hlxja.jar appears on the CLASSPATH used by the compiler.
To run an application which uses the High Level X.400 Java Client API you must have isode-hlxja.jar
on your CLASSPATH, and you must also make sure that the JVM is able to locate shared libraries that are
used by High Level X.400 Java Client API . These shared libraries are installed in (LIBDIR).
For example, to build an application on Unix, you would use something like:
% javac -cp /opt/isode/lib/java/classes/isode-hlxja.jar MyClass.java
and to run the application:
% java -Djava.library.path=/opt/isode/lib -cp /opt/isode/lib/java/classes/isode-hlxja.jar:. MyClass
There are further examples with a Unix shell script and a Windows batch file that explains how to run an
application written using this API.
There are also instructions on how to import the project into Eclipse to develop UAs using this environment.
Examples
There are currently two sample programs, both can use either P3 or P7 servers. One connects to a server
and sends a sample message to itself, the other example connects to a server and receives a message,
printing the information in stdout.
Table Of Content
com.isode.x400.highlevel .............................................................................................................. 4
BadDNException ................................................................................................................ 6
Bodypart ............................................................................................................................. 7
Bodypart.Bodypart_Type .................................................................................................. 12
BodypartFTBP .................................................................................................................. 14
BodypartForwardedMessage............................................................................................ 21
BodypartGeneralText........................................................................................................ 24
BodypartGeneralText.Charset .......................................................................................... 29
BodypartIA5Text ............................................................................................................... 30
FileException .................................................................................................................... 32
ListResult .......................................................................................................................... 33
ListResult.List_status........................................................................................................ 36
NotBoundException .......................................................................................................... 37
P3BindSession ................................................................................................................. 38
P7BindSession ................................................................................................................. 44
P7BindSession.Entry_Class ............................................................................................. 47
ReceiveMsg ...................................................................................................................... 48
Recipient........................................................................................................................... 59
RecipientTools .................................................................................................................. 62
TraceInfoElementItem ...................................................................................................... 63
TraceInformation............................................................................................................... 64
X400APIException............................................................................................................ 65
X400Msg........................................................................................................................... 67
X400Msg.DR_Request ..................................................................................................... 81
X400Msg.Military_Priority ................................................................................................. 83
X400Msg.X400_Message_Type....................................................................................... 84
X400Msg.X400_Priority .................................................................................................... 86
Index............................................................................................................................................ 88
Package com.isode.x400.highlevel
Class Summary
BadDNException
A class representing an exception which can be thrown as a result of an attempt to use an illegal
Distinguished Name or Relative Distinguished Name
Bodypart
Represents a message bodypart, which is one instance of possible several pieces of information
associated with a single message.
Bodypart.Bodypart_Type
BodypartFTBP
This class represents a File Transfer bodypart.
BodypartForwardedMessage
This class represents a Forwarded Message bodypart.
BodypartGeneralText
This class represents a General Text bodypart.
BodypartGeneralText.Charset
Available charsets to use for General Text bodyparts
BodypartIA5Text
This class represents a IA5Text bodypart.
FileException
Thrown when a file operation fails.
ListResult
Result of a LIST operation on a connection to a P7 Message Store.
ListResult.List_status
The status of a message in a Message Store mailbox can be one of three:
NEW - Never been fetched or listed
LISTED - It has been listed, but not fetched
FETCHED - The message has already been fetched
NotBoundException
Thrown when a bind attempt fails, or an attempt is made to communicate with the Message Store
or MTA channel before a successful bind has been performed, or after a connection has been lost.
P3BindSession
Abstracts the connection used for submission to a P3 channel and/or P7 message store The
documentation in the examples here refer to P3 channel.
P7BindSession
Abstracts the connection to a P7 Message Store
P7BindSession.Entry_Class
ReceiveMsg
Message read from a P7 Message Store or the MTA via P3
Recipient
Provides a class that abstracts the recipient of a message.
RecipientTools
TraceInfoElementItem
TraceInformation
X400APIException
Base class representing exception conditions that can be thrown by the Java X.400 API classes.
X400Msg
Creates an X.400 message, preparing it to send it to the P3 channel or the P7 Message Store.
X400Msg.DR_Request
The originator or a message can request the MTA to generate a delivery report for a particular
recipient.
X400Msg.Military_Priority
There are six standard values for military message priority in X.400.
X400Msg.X400_Message_Type
Represents one of the message types (message, report, probe or submitted message).
X400Msg.X400_Priority
There are three standard values for message priority in X.400.
com.isode.x400.highlevel
Class BadDNException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--X400APIException
|
+--com.isode.x400.highlevel.BadDNException
All Implemented Interfaces:
java.io.Serializable
< Constructors >
public class BadDNException
extends X400APIException
A class representing an exception which can be thrown as a result of an attempt to use an illegal
Distinguished Name or Relative Distinguished Name
Constructors
BadDNException
public
BadDNException(java.lang.String message)
Constructs a new BadDNException with the specified message.
Parameters:
message - gives extra detail about the specific exception.
BadDNException
public
BadDNException(java.lang.String message,
int nativeErrorCode)
Constructs a new BadDNException with the specified message and error code
Parameters:
message - gives extra detail about the specific exception.
nativeErrorCode - a value as returned from underlying native code which may be useful in
determining the cause of the problem.
com.isode.x400.highlevel
Class Bodypart
java.lang.Object
|
+--com.isode.x400.highlevel.Bodypart
Direct Known Subclasses:
BodypartFTBP, BodypartForwardedMessage, BodypartGeneralText, BodypartIA5Text
< Fields > < Constructors > < Methods >
public class Bodypart
extends java.lang.Object
Represents a message bodypart, which is one instance of possible several pieces of information
associated with a single message.
Bodyparts have a series of common attributes, like the type and size, that can be accessed in a common
way.
Some specific bodyparts inherit from this class, and provide other methods to access things like file name
or character sets. This class should not be confused with the similarly named BodyPart class, which is
part of the "standard" X.400. This class contains an object of BodyPart class.
Fields
bodypart_size
public int bodypart_size
The size of the bodypart, in bytes
bodypart_type
public Bodypart.Bodypart_Type bodypart_type
The type that identifies this bodypart
Constructors
Bodypart
public
Bodypart(BodyPart bp_obj)
Create a new Bodypart using an existing {@link com.isode.x400api.BodyPart BodyPart} object,
which is the one used by the standard X.400 Java API.
Parameters:
bp_obj - The BodyPart object needed to create it.
Bodypart
public
Bodypart(Bodypart.Bodypart_Type type)
throws X400APIException
Create a brand new Bodypart object
Parameters:
type - {@link Bodypart_Type Bodypart_Type} identifying the type of the body part to
create.
Throws:
com.isode.x400.highlevel.X400APIException -
Methods
getBodypartObject
public BodyPart getBodypartObject()
Returns the standard X.400 API bodypart object, that may be needed for advanced processing
getByteParam
public byte[] getByteParam(int param)
throws X400APIException
Returns a byte array parameter value in the bodypart object.
This method assumes that you know what is the int value associated with the parameter that you
want to read
Normally used only for FTBP and Binary bodyparts, to read the {@link
com.isode.x400api.X400_att#X400_S_BODY_DATA X400_att.X400_S_BODY_DATA} parameter.
An exception is thrown if the value cannot be read.
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
Throws:
com.isode.x400.highlevel.X400APIException -
getIntParam
public int getIntParam(int param)
throws X400APIException
Returns an integer parameter value in the bodypart object. If the parameter is not present, then -1
is returned. An exception is thrown if the value cannot be read for any other reason.
This method assumes that you know what is the int value associated with the parameter that you
want to read
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
Throws:
com.isode.x400.highlevel.X400APIException -
getSize
public int getSize()
Returns the size of message bodypart in bytes. If the value is not known, return -1
getStringParam
public java.lang.String getStringParam(int param)
throws X400APIException
Returns a String parameter value in the bodypart object An exception is thrown if the value cannot
be read.
This method assumes that you know what is the int value associated with the parameter that you
want to read
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
Throws:
com.isode.x400.highlevel.X400APIException -
getType
public Bodypart.Bodypart_Type getType()
Returns the type of message bodypart as a Bodypart_Type
getTypeAsString
public java.lang.String getTypeAsString()
Returns the type of message bodypart
saveBP
public void saveBP(java.lang.String filename)
Save this Bodypart to a file. Only a subset of supported bodyparts can be saved to a file at
present. These include:
BODYPART_IA5_TEXT
BODYPART_BINARY
BODYPART_FTBP
Parameters:
filename - : the file where to save the bodypart
setByteParam
public void setByteParam(int param,
byte[] value)
throws X400APIException
Sets a byte array parameter value in the bodypart object. An exception is thrown if the value
cannot be set.
This method assumes that you know what is the int value associated with the parameter that you
want to set, and what is a valid value to associate with it.
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
value Throws:
com.isode.x400.highlevel.X400APIException -
setIntParam
public void setIntParam(int param,
int value)
throws X400APIException
Sets an integer parameter value in the bodypart object. An exception is thrown if the value cannot
be set.
This method assumes that you know what is the int value associated with the parameter that you
want to set, and what is a valid value to associate with it.
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
value Throws:
com.isode.x400.highlevel.X400APIException -
setSize
public void setSize(int bs)
Sets the size of message bodypart in bytes
setStringParam
public void setStringParam(int param,
java.lang.String value)
throws X400APIException
Sets a String parameter value in the bodypart object. An exception is thrown if the value cannot be
set.
This method assumes that you know what is the int value associated with the parameter that you
want to set, and what is a valid value to associate with it.
Parameters:
param - The param is one of the parameters listed in {@link
com.isode.x400api.X400_attConstants X400_attConstants}
value Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class Bodypart.Bodypart_Type
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.Bodypart.Bodypart_Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class Bodypart.Bodypart_Type
extends java.lang.Enum
Fields
BODYPART_ACP127DATA
public static final Bodypart.Bodypart_Type BODYPART_ACP127DATA
X.400 P772 ACP127DATA body part
BODYPART_ADATP3
public static final Bodypart.Bodypart_Type BODYPART_ADATP3
X.400 P772 ADatP3 body part type
BODYPART_BINARY
public static final Bodypart.Bodypart_Type BODYPART_BINARY
bilaterally-defined body part
BODYPART_CORRECTIONS
public static final Bodypart.Bodypart_Type BODYPART_CORRECTIONS
X.400 P772 Corrections body part type
BODYPART_FTBP
public static final Bodypart.Bodypart_Type BODYPART_FTBP
File transfer body part
BODYPART_FWDENC
public static final Bodypart.Bodypart_Type BODYPART_FWDENC
X.400 P772 Forwarded Encrypted
BODYPART_FWD_CONTENT
public static final Bodypart.Bodypart_Type BODYPART_FWD_CONTENT
X.400 Forwarded content bodypart specified within X.420
BODYPART_GENERAL_TEXT
public static final Bodypart.Bodypart_Type BODYPART_GENERAL_TEXT
general-text body part containing arbitrary character sets
BODYPART_IA5_TEXT
public static final Bodypart.Bodypart_Type BODYPART_IA5_TEXT
ia5-text body part. Only the ia5 repertoire is supported
BODYPART_ISO8859_1
public static final Bodypart.Bodypart_Type BODYPART_ISO8859_1
general-text body part containing ISO-8859-1 text
BODYPART_ISO8859_2
public static final Bodypart.Bodypart_Type BODYPART_ISO8859_2
general-text body part containing ISO-8859-2 text
BODYPART_MESSAGE
public static final Bodypart.Bodypart_Type BODYPART_MESSAGE
Forwarded message body part, or returned IPM in IPN
BODYPART_MM
public static final Bodypart.Bodypart_Type BODYPART_MM
X.400 P772 MM Forwarded bodypart
Methods
valueOf
public static Bodypart.Bodypart_Type valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.Bodypart.Bodypart_Type[] values()
com.isode.x400.highlevel
Class BodypartFTBP
java.lang.Object
|
+--Bodypart
|
+--com.isode.x400.highlevel.BodypartFTBP
< Constructors > < Methods >
public class BodypartFTBP
extends Bodypart
This class represents a File Transfer bodypart.
This kind of bodypart is used to preserve attributes like the file name, the size, creation time, modification
time, file persmission, etc.
Note that the dates returned by the get() method, and those expected by set() methods are in UTC Time
format. This encodes it as YYMMDDHHMMSSzone.
For example, 2 October 2008, at 15:37:41 GMT is 081002153741Z.
Constructors
BodypartFTBP
public
BodypartFTBP(BodyPart bp_obj)
throws X400APIException
Constructor based on an existing bodypart object, for example, one read from an existing
message.
Parameters:
bp_obj Throws:
com.isode.x400.highlevel.X400APIException -
BodypartFTBP
public
BodypartFTBP(java.lang.String filename,
boolean set_common_attributes)
throws X400APIException
Create a new File Transfer bodypart, optionally setting all the common attributes with information
taken from the file itself.
Parameters:
filename - Full path name to the file to use as a bodypart
set_common_attributes - If true, set the file name, file size and encoding
Throws:
com.isode.x400.highlevel.X400APIException -
BodypartFTBP
public
BodypartFTBP(java.lang.String filename,
byte[] ftbp_data)
throws X400APIException
Create a new File Transfer bodypart, with the binary data provided (in memory) and the filename.
This method can be used when the data is already held in memory, and there's no file in the file
system corresponding to "filename".
All the other attributes, like modification date, etc, can be added independently after.
Alternatively, if the file name exists, you can use the BodypartFTBP(filename, true) method to set
the standard values automatically.
Throws:
com.isode.x400.highlevel.X400APIException -
Methods
getApplicationReferenceOID
public java.lang.String getApplicationReferenceOID()
throws X400APIException
Returns the application reference OID of the File Transfer Body Part The value is a dotted decimal
value.
For example: the value "2.16.840.1.113694.2.2.1.1" corresponds to ID value registered by the
Electronic Messaging Association (EMA) to represent the abstract-value
'generic-binary-attachment'
Throws:
com.isode.x400.highlevel.X400APIException -
getApplicationReferenceString
public java.lang.String getApplicationReferenceString()
throws X400APIException
Returns the application reference of the File Transfer Body Part, as a String
Throws:
com.isode.x400.highlevel.X400APIException -
getBodyData
public byte[] getBodyData()
throws X400APIException
Returns the data of the File Transfer Body Part as an array of bytes
Throws:
com.isode.x400.highlevel.X400APIException -
getContentDescription
public java.lang.String getContentDescription()
throws X400APIException
Returns the content description of the File Transfer Body Part
Throws:
com.isode.x400.highlevel.X400APIException -
getCreationDate
public java.lang.String getCreationDate()
throws X400APIException
Returns the creation date of the File Transfer Body Part, encoded as a UTC time string
Throws:
com.isode.x400.highlevel.X400APIException -
getFileName
public java.lang.String getFileName()
throws X400APIException
Returns the name of the file attribute of the File Transfer Body Part
Throws:
com.isode.x400.highlevel.X400APIException -
getModificationDate
public java.lang.String getModificationDate()
throws X400APIException
Returns the modification date of the File Transfer Body Part, encoded as a UTC time string
Throws:
com.isode.x400.highlevel.X400APIException -
getReadDate
public java.lang.String getReadDate()
throws X400APIException
Returns the read date of the File Transfer Body Part, encoded as a UTC time string
Throws:
com.isode.x400.highlevel.X400APIException -
getSize
public int getSize()
Returns the size (in bytes) of the file in the File Transfer Body Part, or -1 if the size cannot be
calculated.
Overrides:
getSize in class Bodypart
getStringRepresentation
public java.lang.String getStringRepresentation()
Returns the string of the File Transfer bodypart.
The format of this string is suitable for informing the user about the forwarded message bodypart,
but does not contain all the information.
saveFTBPInDir
public void saveFTBPInDir(java.lang.String outputDir)
Save the FTBP in the specified directory, the file name will be the one specified in the actual
bodypart
Parameters:
outputDir -
setApplicationReference
public void setApplicationReference(java.lang.String appRefStr)
throws X400APIException
Set the application reference of the File Transfer Body Part
Parameters:
appRefStr - application reference string
Throws:
com.isode.x400.highlevel.X400APIException -
setApplicationReferenceOID
public void setApplicationReferenceOID(java.lang.String appRefOID)
throws X400APIException
Set the application reference OID of the File Transfer Body Part The value is a dotted decimal
value.
For example: the value "2.16.840.1.113694.2.2.1.1" corresponds to ID value registered by the
Electronic Messaging Association (EMA) to represent the abstract-value
'generic-binary-attachment'
Parameters:
appRefOID - application reference OID
Throws:
com.isode.x400.highlevel.X400APIException -
setBodyData
public void setBodyData(byte[] data)
throws X400APIException
Set the data of the File Transfer Body Part as an array of bytes
Parameters:
data - Data to use for the FTBP
Throws:
com.isode.x400.highlevel.X400APIException -
setContentDescription
public void setContentDescription(java.lang.String description)
throws X400APIException
Set the content description of the File Transfer Body Part
Parameters:
description - description
Throws:
com.isode.x400.highlevel.X400APIException -
setCreationDate
public void setCreationDate(java.lang.String cd)
throws X400APIException
Set the creation date of the File Transfer Body Part, encoded as a UTC time string
Parameters:
cd - creation date
Throws:
com.isode.x400.highlevel.X400APIException -
setFTBPSize
public void setFTBPSize(int size)
Set the size (in bytes) of the FTBP
Parameters:
size - The size, in bytes, of the file
setFileName
public void setFileName(java.lang.String filename)
Set the name of the file attribute of the File Transfer Body Part
Parameters:
filename - Name of the file (doesn't have to contain the full path)
setModificationDate
public void setModificationDate(java.lang.String md)
throws X400APIException
Set the modification date of the File Transfer Body Part
Parameters:
md - the file's modification date, encoded as a UTC time string
Throws:
com.isode.x400.highlevel.X400APIException -
setReadDate
public void setReadDate(java.lang.String rd)
throws X400APIException
Set the read date of the File Transfer Body Part, encoded as a UTC time string
Parameters:
rd - read date
Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class BodypartForwardedMessage
java.lang.Object
|
+--Bodypart
|
+--com.isode.x400.highlevel.BodypartForwardedMessage
< Constructors > < Methods >
public class BodypartForwardedMessage
extends Bodypart
This class represents a Forwarded Message bodypart. This kind of bodypart is used to include an entire
message as a bodypart of another message.
Constructors
BodypartForwardedMessage
public
BodypartForwardedMessage(BodyPart bp_obj)
throws X400APIException
Constructor based on an existing BodyPart object, for example, one read from an existing
message
Parameters:
bp_obj - Must not be null
Throws:
com.isode.x400.highlevel.X400APIException -
BodypartForwardedMessage
public
BodypartForwardedMessage(MSMessage msg)
throws X400APIException
Constructor based on an existing existing MSMessage object.
Parameters:
msg Throws:
com.isode.x400.highlevel.X400APIException -
Methods
getFwdMSMessage
public MSMessage getFwdMSMessage()
Returns:
the "MSMessage" object that represents the forwarded message The value will not be null
getFwdMessage
public Message getFwdMessage()
Returns:
the "Message" object that represents the forwarded message. The value will not be null.
getStringRepresentation
public java.lang.String getStringRepresentation()
Returns:
a string representation of message bodypart.
The format of this string is suitable for informing the user about the forwarded message
bodypart, but does not contain all the information.
The returned value will never be null.
setFwdMSMessage
public void setFwdMSMessage(MSMessage fwd)
Sets the "MSMessage" object that represents the forwarded message
Parameters:
fwd - Must not be null
setFwdMessage
public void setFwdMessage(Message fwdMsg)
Sets the "Message" object that represents the forwarded message
Parameters:
fwd - Must not be null
com.isode.x400.highlevel
Class BodypartGeneralText
java.lang.Object
|
+--Bodypart
|
+--com.isode.x400.highlevel.BodypartGeneralText
< Constructors > < Methods >
public class BodypartGeneralText
extends Bodypart
This class represents a General Text bodypart.
When creating an instance of this class, you must provide the charset and the content. You must ensure
that the content is correct for the charset.
The charset must be one the ones provided by the class Charset E.g. WEST_EUROPEAN (that maps to
"1 6 100")
Constructors
BodypartGeneralText
public
BodypartGeneralText(BodyPart bp_obj)
throws X400APIException
Constructor based on an existing bodypart object, for example, one read from an existing
message.
Parameters:
bp_obj Throws:
com.isode.x400.highlevel.X400APIException -
BodypartGeneralText
public
BodypartGeneralText(boolean iso_8859_1,
java.lang.String ct)
throws X400APIException
Creates a General Text bodypart, with a content suitable for ISO-8895-1 (if iso_8859_1 is true) or
ISO-8895-2 (if iso_8859_1 is false). The advantage of this method is that there's no need to
specify the charset.
Parameters:
iso_8859_1 ct Throws:
com.isode.x400.highlevel.X400APIException -
BodypartGeneralText
public
BodypartGeneralText(BodypartGeneralText.Charset cs,
java.lang.String ct)
throws X400APIException
Constructor based on data provided by the user, including the charset and content. For
ISO-8895-1 and ISO-8895-2 you can use the constructor BodypartGeneralText(boolean iso1,
String ct) specifying true for ISO-8895-1 and false for ISO-8895-2
Parameters:
cs ct Throws:
com.isode.x400.highlevel.X400APIException -
BodypartGeneralText
public
BodypartGeneralText(java.lang.String charset,
java.lang.String ct)
throws X400APIException
Constructor based on data provided by the user, including the charset and content. For
ISO-8895-1 and ISO-8895-2 you can use the constructor BodypartGeneralText(boolean iso1,
String ct) specifying true for ISO-8895-1 and false for ISO-8895-2
Parameters:
cs ct Throws:
com.isode.x400.highlevel.X400APIException -
BodypartGeneralText
public
BodypartGeneralText(java.lang.String charset,
java.lang.String rawContent,
boolean raw)
throws X400APIException
Constructor based on data provided by the user, including the charset as a String and the raw
content as a String. The raw boolean method is a stub to differentiate the constructor
Parameters:
charset rawContent raw Throws:
com.isode.x400.highlevel.X400APIException -
Methods
getCharset
public BodypartGeneralText.Charset getCharset()
throws
X400APIException
Returns the Charset of this General Text bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
getCharsetString
public java.lang.String getCharsetString()
throws X400APIException
Returns the charset string of this General Text bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
getSize
public int getSize()
throws X400APIException
Returns the size, in bytes, of the message bodypart.
Overrides:
getSize in class Bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
getStringRepresentation
public java.lang.String getStringRepresentation()
throws X400APIException
Returns the string representation of this message bodypart.
Throws:
com.isode.x400.highlevel.X400APIException -
getTextContent
public java.lang.String getTextContent()
throws X400APIException
Returns the content of this General Text bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
saveBP
public void saveBP(java.lang.String filename)
Overrides:
saveBP in class Bodypart
setCharset
public void setCharset(BodypartGeneralText.Charset cs)
throws X400APIException
Sets the charset of this General Text bodypart
Parameters:
cs Throws:
com.isode.x400.highlevel.X400APIException -
setContentFromFile
public void setContentFromFile(java.lang.String file)
throws X400APIException
Sets the content of this General Text bodypart
Parameters:
file Throws:
com.isode.x400.highlevel.X400APIException -
setSize
public void setSize(int s)
Sets the size of message bodypart in bytes.
Overrides:
setSize in class Bodypart
setTextContent
public void setTextContent(java.lang.String ct)
throws X400APIException
Sets the content of this General Text bodypart
Parameters:
ct Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class BodypartGeneralText.Charset
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.BodypartGeneralText.Charset
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class BodypartGeneralText.Charset
extends java.lang.Enum
Available charsets to use for General Text bodyparts
Fields
ARABIC
public static final BodypartGeneralText.Charset ARABIC
CYRILLIC
public static final BodypartGeneralText.Charset CYRILLIC
EAST_EUROPEAN
public static final BodypartGeneralText.Charset EAST_EUROPEAN
GREEK
public static final BodypartGeneralText.Charset GREEK
HEBREW
public static final BodypartGeneralText.Charset HEBREW
OTHER_LATIN
public static final BodypartGeneralText.Charset OTHER_LATIN
WEST_EUROPEAN
public static final BodypartGeneralText.Charset WEST_EUROPEAN
stringVal
public java.lang.String stringVal
Methods
toString
public java.lang.String toString()
Overrides:
toString in class java.lang.Enum
valueOf
public static BodypartGeneralText.Charset valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.BodypartGeneralText.Charset[] values()
com.isode.x400.highlevel
Class BodypartIA5Text
java.lang.Object
|
+--Bodypart
|
+--com.isode.x400.highlevel.BodypartIA5Text
< Constructors > < Methods >
public class BodypartIA5Text
extends Bodypart
This class represents a IA5Text bodypart.
When creating an instance of this class, you must provide a string with the content. You must ensure that
the content only contains valid IA5 characters.
Constructors
BodypartIA5Text
public
BodypartIA5Text(BodyPart bp_obj)
throws X400APIException
Create a new IA5 bodypart, based on an existing bodypart object, for example, one read from an
existing message.
Parameters:
bp_obj Throws:
com.isode.x400.highlevel.X400APIException -
Methods
getRepertoire
public int getRepertoire()
Returns the IA5 repertoire
Returns:
getStringRepresentation
public java.lang.String getStringRepresentation()
throws X400APIException
Get the string of message bodypart. For this bodypart type, this is equivalent to getTextContent().
Throws:
com.isode.x400.highlevel.X400APIException -
getTextContent
public java.lang.String getTextContent()
throws X400APIException
Returns the text content of this IA5 bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
setRepertoire
public void setRepertoire(int repertoire)
Sets the IA5 repertoire
Parameters:
repertoire -
setTextContent
public void setTextContent(java.lang.String bp_cont)
throws X400APIException
Set the text content of this IA5 bodypart
Parameters:
bp_cont Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class FileException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--X400APIException
|
+--com.isode.x400.highlevel.FileException
All Implemented Interfaces:
java.io.Serializable
< Constructors >
public class FileException
extends X400APIException
Thrown when a file operation fails.
Constructors
FileException
public
FileException(java.lang.String message)
Constructs a new NotBoundException with the specified message.
Parameters:
message - gives extra detail about the specific exception.
FileException
public
FileException(java.lang.String message,
int nativeErrorCode)
Constructs a new FileException with the specified message and error code
Parameters:
message - gives extra detail about the specific exception.
nativeErrorCode - a value as returned from underlying native code which may be useful in
determining the cause of the problem.
com.isode.x400.highlevel
Class ListResult
java.lang.Object
|
+--com.isode.x400.highlevel.ListResult
< Constructors > < Methods >
public class ListResult
extends java.lang.Object
Result of a LIST operation on a connection to a P7 Message Store.
Constructors
ListResult
public
ListResult()
This class represents a single message in the list result of an X.400 Message Store mailbox.
Methods
getContLength
public int getContLength()
Returns the size of the message content, in bytes.
getContentType
public java.lang.String getContentType()
Returns the content type of the message, as a String
getMsgID
public java.lang.String getMsgID()
Returns the Message Identifier of the message
getPriority
public X400Msg.X400_Priority getPriority()
Returns the standard X.400 priority of the message as a {@link X400_Priority X400_Priority}
object
getSender
public java.lang.String getSender()
Returns the String encoded O/R address of the sender of the message
getSequenceNumber
public int getSequenceNumber()
Returns the Sequence Number of the message in the X.400 Message Store mailbox
getStatus
public ListResult.List_status getStatus()
Returns a {@link List_status List_status} object representing the Message Store status of the
message, that is, if it is new, has been listed or fetched.
getSubject
public java.lang.String getSubject()
Returns the subject of the message
getSubjectID
public java.lang.String getSubjectID()
Returns the Subject Identifier (not the Subject of the message). This is used to to correlate a
Delivery Report that was received, to a message that was sent.
getSubmissionTime
public java.lang.String getSubmissionTime()
Returns the submission time of the message, as a UTC Time encoded string
getType
public X400Msg.X400_Message_Type getType()
Returns the type the message as a {@link X400_Message_Type X400_Message_Type} object
com.isode.x400.highlevel
Class ListResult.List_status
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.ListResult.List_status
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class ListResult.List_status
extends java.lang.Enum
The status of a message in a Message Store mailbox can be one of three:
NEW - Never been fetched or listed
LISTED - It has been listed, but not fetched
FETCHED - The message has already been fetched
Fields
FETCHED
public static final ListResult.List_status FETCHED
LISTED
public static final ListResult.List_status LISTED
NEW
public static final ListResult.List_status NEW
status
public final int status
Methods
valueOf
public static ListResult.List_status valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.ListResult.List_status[] values()
com.isode.x400.highlevel
Class NotBoundException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--X400APIException
|
+--com.isode.x400.highlevel.NotBoundException
All Implemented Interfaces:
java.io.Serializable
< Constructors >
public class NotBoundException
extends X400APIException
Thrown when a bind attempt fails, or an attempt is made to communicate with the Message Store or MTA
channel before a successful bind has been performed, or after a connection has been lost.
Constructors
NotBoundException
public
NotBoundException(java.lang.String message)
Constructs a new NotBoundException with the specified message.
Parameters:
message - gives extra detail about the specific exception.
NotBoundException
public
NotBoundException(java.lang.String message,
int nativeErrorCode)
Constructs a new NotBoundException with the specified message and error code
Parameters:
message - gives extra detail about the specific exception.
nativeErrorCode - a value as returned from underlying native code which may be useful in
determining the cause of the problem.
com.isode.x400.highlevel
Class P3BindSession
java.lang.Object
|
+--Session
|
+--com.isode.x400.highlevel.P3BindSession
Direct Known Subclasses:
P7BindSession
< Fields > < Constructors > < Methods >
public class P3BindSession
extends Session
Abstracts the connection used for submission to a P3 channel and/or P7 message store The
documentation in the examples here refer to P3 channel. The class MStore extends this class and adds
P7 Message Store specific methods, like listing the content of a mailbox, deleting messages, etc.
Fields
available
protected static final java.util.concurrent.Semaphore available
bound
protected boolean bound
Boolean value that represents if the session is bound or not
credentials
protected java.lang.String credentials
The password for the P3 user
disable_config_requests
protected boolean disable_config_requests
Disable configuration requests in MS bind operations
pa
protected java.lang.String pa
Presentation Address of the P3 channel
sec_init
protected boolean sec_init
Boolean value that represents if the security environment has been initialized or not
user_dn
protected java.lang.String user_dn
P3 user DN
user_oraddr
protected java.lang.String user_oraddr
P3 user O/R address
Constructors
P3BindSession
public
P3BindSession(java.lang.String presentation_address,
java.lang.String or_addr,
java.lang.String passwd)
Create a P3BindSession
Parameters:
presentation_address - the P3 channel's Presentation Address Typical values are
"593"/Internet=myserver.mycompany.com
or_addr - the string encoded O/R address of the P3 channel user. For example /"cn=John
Smith, o=Address Book, o=Isode, c=GB"
passwd - the P3 channel's password that correspond to the user
P3BindSession
public
P3BindSession(java.lang.String presentation_address,
java.lang.String or_addr,
java.lang.String passwd,
boolean submit_only)
Create a P3BindSession, specifying whether the session should be used for Submission only or
not.
Parameters:
presentation_address - the P3 channel's Presentation Address Typical values are
"593"/Internet=myserver.mycompany.com
or_addr - the string encoded O/R address of the P3 channel user. For example /"cn=John
Smith, o=Address Book, o=Isode, c=GB"
passwd - the P3 channel's password that correspond to the user
submit_only - Set to true if this session is only to be used for submission
Methods
acquireSemaphore
protected void acquireSemaphore()
bind
public synchronized void bind()
throws X400APIException
Bind to the P3 channel
Throws:
com.isode.x400.highlevel.X400APIException -
getSession
public Session getSession()
Retrieve the Session object
Returns:
A Session object. This is the object that is need to, for example, read or create a message
isBound
public boolean isBound()
Check if this session is bound or not.
This means that the application think it is still bound to the server, but bear in mind that the
connection may have been dropped by the server for any number of reasons, and this application
won't be informed.
Returns:
Returns true if the session bind() was successful and unbind() was not called.
receiveNextAvailableMessage
public ReceiveMsg receiveNextAvailableMessage()
throws X400APIException
Receive the "next available message" from the Message Store
Throws:
com.isode.x400.highlevel.X400APIException -
releaseSemaphore
protected void releaseSemaphore()
setDisableConfigRequest
public void setDisableConfigRequest(boolean b)
Enables or disables the request of configuration from the MTA or Message Store. This will be
needed by some non-Isode Message Stores or MTAs, like the Deutsche Telekom service.
Parameters:
b-
setSecurityEnv
public void setSecurityEnv(java.lang.String id,
java.lang.String id_dn,
java.lang.String pass)
throws X400APIException
Set the session's security environment data.
The information is passed on to the underlying API, but is not checked at this stage. This means
that the information may be invalid, but won't be noticed until later on.
Parameters:
pkcs12file - - The absolute path of the PKCS#12 file with the user certificate
pkcs12password - - The password for the PKCS#12 user certificate
sec_trusted_ca_cert_dir - - The directory where the trusted certificates for the CAs are kept
Throws:
com.isode.x400.highlevel.X400APIException -
setSecurityEnvPKCS12
public void setSecurityEnvPKCS12(java.lang.String pkcs12FileName,
java.lang.String password,
java.lang.String sec_trusted_ca_cert_dir)
throws X400APIException
Set the session's security environment data.
The information is passed on to the underlying API, but is not checked at this stage. This means
that the information may be invalid, but won't be noticed until later on.
Parameters:
pkcs12FileName - String : The PKCS#12 file that corresponds to this user, containing it's
O/R address
password - String : Passphrase to open the PKCS#12 file
sec_trusted_ca_cert_dir: - the directory where the CA's trusted certificates are kept
(optional)
Throws:
com.isode.x400.highlevel.X400APIException -
setUserDN
public void setUserDN(java.lang.String my_user_dn)
throws BadDNException
Set the P3 channel user's DN
This is the string encoded O/R address of the user. For example /"cn=John Smith, o=Address
Book, o=Isode, c=GB"
Throws:
com.isode.x400.highlevel.BadDNException -
unbind
public synchronized void unbind()
throws X400APIException
Unbind from the P3 channel or P7 Message Store.
Closes the connection to the the P3 channel or P7 Message Store. No more messages can be
sent or received until a new connection is open.
Throws:
com.isode.x400.highlevel.X400APIException -
waitForNewMessages
public int waitForNewMessages(int seconds)
throws X400APIException
Wait for a new message the specified number of seconds. If seconds is 0, then there's no wait. If
seconds is negative, then the delay is indefinite.
Parameters:
seconds Returns:
X400_att.X400_E_NOERROR if there were no errors and a message is ready to be read
X400_att.X400_E_TIMED_OUT: if no messages arrived in the specified number of
seconds
X400_att.X400_E_NO_MESSAGE: if there are no more messages to read
Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class P7BindSession
java.lang.Object
|
+--Session
|
+--P3BindSession
|
+--com.isode.x400.highlevel.P7BindSession
< Fields > < Constructors > < Methods >
public class P7BindSession
extends P3BindSession
Abstracts the connection to a P7 Message Store
Fields
summarize_on_bind
protected boolean summarize_on_bind
Constructors
P7BindSession
public
P7BindSession(java.lang.String presentation_address,
java.lang.String or_addr,
java.lang.String passwd)
Create a P7BindSession using the connection information provided
Parameters:
presentation_address - the P7 Message Store Presentation Address. Typical values are
"3001"/Internet=myserver.mycompany.com+3001
or_addr - the string encoded O/R address of the P7 Message Store user. For example
/"cn=John Smith, o=Address Book, o=Isode, c=GB"
passwd - the password that correspond to the P7 user
P7BindSession
public
P7BindSession(java.lang.String presentation_address,
java.lang.String or_addr,
java.lang.String passwd,
boolean summarize)
Create a P7BindSession using the connection information provided, and control the issuing of a
SUMMARIZE operation after a bind.
In case the result of this SUMMARIZE is not going to be used, it's better to set it to "false" to
improve the performance of the Message Store.
Parameters:
presentation_address - the P7 Message Store Presentation Address. Typical values are
"3001"/Internet=myserver.mycompany.com+3001
or_addr - the string encoded O/R address of the P7 Message Store user. For example
/"cn=John Smith, o=Address Book, o=Isode, c=GB"
passwd - the password that correspond to the P7 user
summarize - issue a SUMMARIZE operation after a bind, to return the number of unread
messages set to false by default
Methods
bind
public synchronized void bind()
throws X400APIException
Bind to the Message Store with the information that has already been set
Overrides:
bind in class P3BindSession
Throws:
com.isode.x400.highlevel.X400APIException -
deleteMessage
public void deleteMessage(MSMessage msmessage_obj)
throws X400APIException
Delete message object , freeing the memory and resource, and also delete the message from the
Message Store mailbox.
Throws:
com.isode.x400.highlevel.X400APIException -
deleteMessageObject
public void deleteMessageObject(MSMessage msmessage_obj)
throws X400APIException
Delete message object, freeing the memory and resource, but retains the message in the
Message Store mailbox
Throws:
com.isode.x400.highlevel.X400APIException -
getRefreshNumberOfMessages
public int getRefreshNumberOfMessages()
throws X400APIException
Checks again the number of messages in the Message Store mailbox, as it may have not been set
before, or may need refreshing.
Throws:
com.isode.x400.highlevel.X400APIException -
listMailbox
public java.util.ArrayList listMailbox(java.lang.String since,
P7BindSession.Entry_Class entry_class,
boolean only_new_messages)
throws X400APIException
List the messages in the mailbox, returning an ArrayList of {@link ListResult ListResult} objects,
each one of them representing a message in the mailbox, that matched the requested search
pattern.
The information in {@link ListResult ListResult} contains, each message subject, size, read status,
etc.
Parameters:
since - Date from which to list messages, in UTC Time format, or null if not used.
entry_class - Type of entry to list. One of: MS_ENTRY_CLASS_STORED_MESSAGES
MS_ENTRY_CLASS_SUBMITTED_MESSAGES
only_new_messages - Whether to show only new messages
Throws:
com.isode.x400.highlevel.X400APIException -
com.isode.x400.highlevel
Class P7BindSession.Entry_Class
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.P7BindSession.Entry_Class
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class P7BindSession.Entry_Class
extends java.lang.Enum
Fields
MS_ENTRY_CLASS_STORED_MESSAGES
public static final P7BindSession.Entry_Class MS_ENTRY_CLASS_STORED_MESSAGES
MS_ENTRY_CLASS_SUBMITTED_MESSAGES
public static final P7BindSession.Entry_Class
MS_ENTRY_CLASS_SUBMITTED_MESSAGES
Methods
valueOf
public static P7BindSession.Entry_Class valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.P7BindSession.Entry_Class[] values()
com.isode.x400.highlevel
Class ReceiveMsg
java.lang.Object
|
+--MSMessage
|
+--com.isode.x400.highlevel.ReceiveMsg
< Constructors > < Methods >
public class ReceiveMsg
extends MSMessage
Message read from a P7 Message Store or the MTA via P3
Constructors
ReceiveMsg
public
ReceiveMsg(P3BindSession p3_session_obj)
throws X400APIException
Constructs a new instance of this class given a P3BindSession object
Parameters:
p3_session_obj - : the session object to use for this message
Throws:
com.isode.x400.highlevel.X400APIException -
ReceiveMsg
public
ReceiveMsg(P3BindSession p3_session_obj,
int type,
byte[] content)
throws X400APIException
Constructs a new instance of this class given a byte[] content
Throws:
com.isode.x400.highlevel.X400APIException -
ReceiveMsg
public
ReceiveMsg(P7BindSession session_obj,
int seqn)
throws X400APIException
Constructs a new instance of this class given a P7BindSession and a sequence number. It
connects to the P7 Message Store server specified in session_object and requests the message
identified by seqn.
Parameters:
session_obj - : the session object to use for this message
seqn - : Sequence number in the mailbox of the message to receive
Throws:
com.isode.x400.highlevel.X400APIException -
Methods
delete
public void delete(boolean retainInStore)
Delete message object
Parameters:
retainInStore - boolean : Retain in P7 Message Store (i.e. no P7 Delete) if true
finalize
protected void finalize()
This routine will be called by the Garbage Collector at some point
finishWithMessage
public int finishWithMessage(int errnum,
int diag)
After getting a message from the P3 channel, this method needs to be called to let the P3 channel
know that the message was received and processed safely (i.e. by writing it to disk, a database or
some other permanent storage)
Parameters:
errnum diag -
generateIPN
public X400Msg generateIPN(P3BindSession p3bind_session,
int reason)
Generates an IPN message so that it can be submitted later on
Parameters:
p3bind_session - the P3 or P7 session object to use for the IPN generation
reason - Reason to use for the IPN
Returns:
an IPN (X400Msg object) or null if it failed
getBccRecipients
public java.util.ArrayList getBccRecipients()
Returns the message blind copy recipients (Bcc:), as an array list of Recipient objects
getBodypart
public Bodypart getBodypart(int bp_num)
Returns the specified bodypart of the message
Parameters:
bp_num - Bodypart number (starting from 1)
Returns:
An Bodypart object
getCcRecipients
public java.util.ArrayList getCcRecipients()
Returns the message copy recipients (Cc:), as an array list of Recipient objects
getCopyPrecedence
public int getCopyPrecedence()
throws X400APIException
Obtain copy precedence value from message, if any.
Returns:
Copy Precedence value or -1 if not present
Throws:
com.isode.x400.highlevel.X400APIException - if an internal error has occurred - this is
almost certainly something fatal.
getDLExpansionHistory
public java.lang.String getDLExpansionHistory()
Returns the Distribution List Expansion History element of the message, if it exists, otherwise ""
getEnvelopeRecipients
public java.util.ArrayList getEnvelopeRecipients()
Returns the message envelope recipients, as an array list of Recipient objects
getFrom
public java.lang.String getFrom()
throws X400APIException
Returns the sender's String encoded O/R address
Throws:
com.isode.x400.highlevel.X400APIException -
getIPMHeaderRecipients
public java.util.ArrayList getIPMHeaderRecipients()
Returns the message IPM Header recipients, as an array list of Recipient objects
getIPNContentAsText
public java.lang.String getIPNContentAsText()
throws X400APIException
Returns a English text representation of the content of the IPN
Throws:
com.isode.x400.highlevel.X400APIException -
getImportance
public int getImportance()
throws X400APIException
Returns the importance of the message
Throws:
com.isode.x400.highlevel.X400APIException -
getIntParam
public int getIntParam(int param)
throws X400APIException
Get the specified integer message parameter
Parameters:
param - int: One of the X400_att constants
Returns:
Returns the integer value of the parameter, or -1 if the parameter was not present in the
message (i.e. it returned X400_E_NO_VALUE or X400_E_BADPARAM). Otherwise it
throws an X400APIException
Throws:
com.isode.x400.highlevel.X400APIException -
getInternalTraceInformation
public java.util.ArrayList getInternalTraceInformation()
Returns a string representation of the Internal Trace Information
Returns:
getJRSecurityLabel
public JRSecurityLabel getJRSecurityLabel()
Read the X.411 security label from the message
Returns:
a JRSecurityLabel object representing the X.411 security label of the message
getMessageDeliveryTime
public java.lang.String getMessageDeliveryTime()
throws X400APIException
Returns the message delivery time as a UTC string
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageDeliveryTimeAsDate
public java.util.Date getMessageDeliveryTimeAsDate()
throws X400APIException
Returns the message delivery time as a Date
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageIdentifier
public java.lang.String getMessageIdentifier()
throws X400APIException
Returns the message identifier
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageSubmissionTime
public java.lang.String getMessageSubmissionTime()
throws X400APIException
Returns the message submission time as a UTC string
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageSubmissionTimeAsDate
public java.util.Date getMessageSubmissionTimeAsDate()
throws X400APIException
Returns the message submission time as a Date
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageType
public X400Msg.X400_Message_Type getMessageType()
Returns the type of the message as a X400_Message_Type
getMilitaryPriority
public X400Msg.Military_Priority getMilitaryPriority()
throws
X400APIException
Returns:
the military priority of this message. This method will return null if any of these conditions
apply:
- the message doesn't have the external content type set to P772 (1.3.26.0.4406.0.4.1)
- the message is an IPN
- the message is a Delivery Report
Note that old implementations of this method used to return non-null values in the above
cases.
Throws:
com.isode.x400.highlevel.X400APIException -
getMsgPrecedence
public int getMsgPrecedence()
Returns the message precedence, taken from one of the recipients.
getNumberOfBodyparts
public int getNumberOfBodyparts()
throws X400APIException
Returns the number of bodyparts of the message
Throws:
com.isode.x400.highlevel.X400APIException -
getOriginatorFreeFormName
public java.lang.String getOriginatorFreeFormName()
throws X400APIException
Returns the sender's free form name, if available
Throws:
com.isode.x400.highlevel.X400APIException -
getOriginatorORAddress
public java.lang.String getOriginatorORAddress()
throws X400APIException
Returns the sender's O/R address
Throws:
com.isode.x400.highlevel.X400APIException -
getPrimaryPrecedence
public int getPrimaryPrecedence()
throws X400APIException
Obtain primary precedence value from message, if any.
Returns:
Primary Precedence value or -1 if not present
Throws:
com.isode.x400.highlevel.X400APIException - if an internal error has occurred - this is
almost certainly something fatal.
getPrintableStringParam
public java.util.ArrayList getPrintableStringParam(int param)
Get a message parameter that has a Printable String format.
Parameters:
param - int: One of the X400_att constants
getRecipients
protected java.util.ArrayList getRecipients(int type)
Returns the message recipients, as an array list of Recipient objects This method is for internal
use only.
getRedirectionHistory
public java.lang.String getRedirectionHistory()
Returns a string representation of the Redirection History element
Returns:
getReportContentAsText
public java.lang.String getReportContentAsText()
throws X400APIException
Returns a English text representation of the content of the report
Throws:
com.isode.x400.highlevel.X400APIException -
getSecurityLabelAsBER
public byte[] getSecurityLabelAsBER()
Read the X.411 security label from the message
Returns:
a byte array with the BER encoded security label
getStringParam
public java.lang.String getStringParam(int param)
throws X400APIException
Get the specified string message parameter
Parameters:
param - int: One of the X400_att constants
Returns:
Returns the String value of the parameter, or "" if the parameter was not present in the
message (i.e. it returned X400_E_NO_VALUE or X400_E_BADPARAM). Otherwise it
throws an X400APIException
Throws:
com.isode.x400.highlevel.X400APIException -
getSubject
public java.lang.String getSubject()
throws X400APIException
Returns the subject of the message
Throws:
com.isode.x400.highlevel.X400APIException -
getTextContent
public java.lang.String getTextContent()
throws X400APIException
Returns the text content of the message as IA5 (if available)
Throws:
com.isode.x400.highlevel.X400APIException -
getToRecipients
public java.util.ArrayList getToRecipients()
Returns the message primary recipients (To:), as an array list of Recipient objects
getTraceInformation
public java.util.ArrayList getTraceInformation()
throws X400APIException
Returns a string representation of the Trace Information
Returns:
Throws:
com.isode.x400.highlevel.X400APIException -
getTypeAsString
public java.lang.String getTypeAsString()
Returns the type of the message as a string (message, report, probe or unknown)
getX400Priority
public X400Msg.X400_Priority getX400Priority()
throws X400APIException
Get the message X.400 priority
Throws:
com.isode.x400.highlevel.X400APIException -
isAllPositiveIPN
public boolean isAllPositiveIPN()
Checks whether the message is an IPN (Inter Personal Notification), and that all the reported
recipients are read receipts (i.e. the message was read by all recipients).
isIPN
public boolean isIPN()
Checks whether the message is an IPN (Inter Personal Notification)
isMilitaryContentType
public boolean isMilitaryContentType()
Returns true if the message's external content type is P772 (1.3.26.0.4406.0.4.1)
com.isode.x400.highlevel
Class Recipient
java.lang.Object
|
+--Recip
|
+--com.isode.x400.highlevel.Recipient
< Constructors > < Methods >
public class Recipient
extends Recip
Provides a class that abstracts the recipient of a message.
This is used both when composing message to send, and also for processing received messages.
Constructors
Recipient
public
Recipient()
Create an empty recipient. The values can be set later on with the set*() methods.
Recipient
public
Recipient(int attr,
java.lang.String value)
Create a recipient, using the given attribute and value.
For example, to create a Recipient with an O/R address, use the value {@link
com.isode.x400api.X400_att#X400_S_OR_ADDRESS X400_att.X400_S_OR_ADDRESS} for attr,
and the String encoded O/R address for the value.
Another attr value supported is {@link
com.isode.x400api.X400_att#X400_S_DIRECTORY_NAME
X400_att.X400_S_DIRECTORY_NAME} which creates a Recipient using the DN.
If attr is neither of these values, it will be assumed that the value passed is an string encoded O/R
Name, which has the syntax:
DN $ OR
That is, a DN followed by the string " $ " and the O/R address.
Parameters:
attr - X400_att.X400_S_OR_ADDRESS or X400_att.X400_S_DIRECTORY_NAME
value -
Methods
getDN
public java.lang.String getDN()
Returns the DN of the recipient
getFreeFormName
public java.lang.String getFreeFormName()
Returns the Free Form name for this recipient
For example "John Smith"
getNotificationRequest
public int getNotificationRequest()
Returns the Notification Request for this recipient
getORAddress
public java.lang.String getORAddress()
Returns the O/R address of the recipient
getPrecedence
public int getPrecedence()
getReplyRequest
public int getReplyRequest()
Returns the Reply Request for this recipient
setDN
public void setDN(java.lang.String d)
Sets the DN of the recipient
Parameters:
d-
setFreeFormName
public void setFreeFormName(java.lang.String f)
Sets the Free Form Name for this recipient.
For example "John Smith"
Parameters:
f-
setNotificationRequest
public void setNotificationRequest(int r)
setORAddress
public void setORAddress(java.lang.String or)
Sets the O/R address of the recipient
Parameters:
or - - The String encoded O/R address
setPrecedence
public void setPrecedence(int r)
setReplyRequest
public void setReplyRequest(int reply_request)
Sets the Reply Request for this recipient
toString
public java.lang.String toString()
Overwrite the method, so that the O/R address becomes the normal way to represent it
com.isode.x400.highlevel
Class RecipientTools
java.lang.Object
|
+--com.isode.x400.highlevel.RecipientTools
< Constructors > < Methods >
public class RecipientTools
extends java.lang.Object
Constructors
RecipientTools
public
RecipientTools()
Methods
getRecipient
public java.util.ArrayList getRecipient(Message message,
int type)
Return a Recipient object based on the message and type requested
Parameters:
message type - one of: X400_ORIGINATOR, X400_RECIP_PRIMARY, X400_RECIP_CC,
X400_RECIP_BCC
Returns:
com.isode.x400.highlevel
Class TraceInfoElementItem
java.lang.Object
|
+--com.isode.x400.highlevel.TraceInfoElementItem
< Constructors >
public class TraceInfoElementItem
extends java.lang.Object
Constructors
TraceInfoElementItem
public
TraceInfoElementItem(java.lang.String key,
java.lang.String value)
com.isode.x400.highlevel
Class TraceInformation
java.lang.Object
|
+--com.isode.x400.highlevel.TraceInformation
< Constructors > < Methods >
public class TraceInformation
extends java.lang.Object
Constructors
TraceInformation
public
TraceInformation()
Methods
getInternalTraceInformation
public int getInternalTraceInformation(MSMessage msmessage_obj,
int entry,
InternalTraceinfo traceinfo_obj,
java.util.ArrayList traceInfoElement)
getTraceInfoString
public java.lang.String getTraceInfoString(java.lang.String indent,
java.util.ArrayList
traceInfoElement)
getTraceInformation
public int getTraceInformation(ReceiveMsg msmessage_obj,
int entry,
Traceinfo traceinfo_obj,
int type,
java.util.ArrayList traceInfoElement)
com.isode.x400.highlevel
Class X400APIException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.isode.x400.highlevel.X400APIException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BadDNException, FileException, NotBoundException
< Constructors > < Methods >
public class X400APIException
extends java.lang.Exception
Base class representing exception conditions that can be thrown by the Java X.400 API classes.
Constructors
X400APIException
public
X400APIException(java.lang.String message)
Constructs a new X400APIException with the specified message.
Parameters:
message - gives extra detail about the specific exception.
X400APIException
public
X400APIException(java.lang.String message,
int nativeErrorCode)
Constructs a new X400APIException with the specified message and error code
Parameters:
message - gives extra detail about the specific exception.
nativeErrorCode - a value as returned from underlying native code which may be useful in
determining the cause of the problem.
Methods
getLocalizedMessage
public java.lang.String getLocalizedMessage()
Override the existing getLocalizedMessage by appending the native error in brackets, if available
Overrides:
getLocalizedMessage in class java.lang.Throwable
getNativeErrorCode
public int getNativeErrorCode()
Determine the native error code (if any) associated with this exception.
Returns:
the native error code, which will be zero if no code is associated with this exception.
getNativeErrorString
public java.lang.String getNativeErrorString()
Return the name of a native error code in String format, for example for 11
(X400_E_BADCREDENTIALS), it returns "Invalid credentials for connection"
Returns:
a String with an explanation of the error code
nativeErrorToString
public static java.lang.String nativeErrorToString(int ds_status_code)
Translate native DS_Status error code value into a String, for example "DS_E_BADDN".
The native layer will typically not throw "DSAPIException" objects, but an exception appropriate to
the error type, e.g. BadDNException. Therefore, the Strings returned by this method are primarily
of interest for debugging purposes, rather than intended for displaying to a user of an application.
Parameters:
ds_status_code - a DSAPI error code, which should be one of the DS_Status constants
Returns:
a String containing the symbolic name of the error code. In the case of an unknown error, a
String of the form "unknown DS_Status (x)" will be returned.
com.isode.x400.highlevel
Class X400Msg
java.lang.Object
|
+--MSMessage
|
+--com.isode.x400.highlevel.X400Msg
< Fields > < Constructors > < Methods >
public class X400Msg
extends MSMessage
Creates an X.400 message, preparing it to send it to the P3 channel or the P7 Message Store.
Fields
IPN_NON_RECEIPT_NOTIFICATION
public static final int IPN_NON_RECEIPT_NOTIFICATION
Request the receiving User Agent (UA) to send an IPN when the message can't be read by this
recipient.
Note that you want to also receive an IPN when its read, you have to add the numeric value of
IPN_RECEIPT_NOTIFICATION
IPN_RECEIPT_NOTIFICATION
public static final int IPN_RECEIPT_NOTIFICATION
Request the receiving User Agent (UA) to send an IPN when the message is read by this recipient.
Note that you want to also receive an IPN when it's not read, you have to add the numeric value of
IPN_NON_RECEIPT_NOTIFICATION
IPN_RETURN_REQUEST
public static final int IPN_RETURN_REQUEST
Request the receiving User Agent (UA) to return the content of the original message in case the
message can't be read by the recipient
P772_OID
public static final java.lang.String P772_OID
Constructors
X400Msg
public
X400Msg(Session session_obj,
boolean probe)
X400Msg
public
X400Msg(P3BindSession p3bind)
X400Msg
public
X400Msg(P3BindSession p3bind,
boolean probe)
Methods
addBodypart
public void addBodypart(Bodypart new_bodypart)
Add a newly created bodypart to a message, this is typically used when composing.
Parameters:
new_bodypart - existing Bodypart object
addExistingBodypart
public void addExistingBodypart(BodyPart existing_bodypart)
Add an existing bodypart to a message, typically a bodypart that was extracted from a received
message.
Parameters:
existing_bodypart -
addMessageForwardBodypart
public void addMessageForwardBodypart(BodypartForwardedMessage fwd)
throws X400APIException
Create a new Message Forward Bodypart
Parameters:
fwd - Forwarded Message object to be used a the forward bodypart
Throws:
com.isode.x400.highlevel.X400APIException -
addSecurityLabelAsBER
public void addSecurityLabelAsBER(java.lang.String sec_label_file)
throws X400APIException
Add a security label, from a file that contains a BER encoded byte array
Parameters:
sec_label_file Throws:
com.isode.x400.highlevel.X400APIException -
addSecurityLabelAsXMLFileName
public void addSecurityLabelAsXMLFileName(java.lang.String sec_label_file)
throws X400APIException
Add a security label, providing a file name that contains a security label encoded in an XML file
Parameters:
sec_label_file Throws:
com.isode.x400.highlevel.X400APIException -
addSecurityLabelAsXMLString
public void addSecurityLabelAsXMLString(java.lang.String sec_label_xml)
throws X400APIException
Add a security label as an XML encoded String
Parameters:
sec_label_xml Throws:
com.isode.x400.highlevel.X400APIException -
buildMsg
public void buildMsg(Session session_obj)
Build the message
Parameters:
session_obj - Session: This is session object, as returned by the MStore getSession()
method. Before you call this method, you need to bind to the Message Store, and obtain
the session_object that represents the connection. This method is now deprecated - it does
not do anything any more.
delete
public void delete(boolean retainInStore)
Delete message object
Parameters:
retainInStore - boolean : Retain in P7 Message Store (i.e. no P7 Delete) if true
finalize
protected void finalize()
getContentBytes
public byte[] getContentBytes()
Get the content of the message, as a byte[]
Returns:
getFreeFormName
public java.lang.String getFreeFormName(Recip ms_recip_obj)
throws X400APIException
Parameters:
ms_recip_obj Returns:
the free form name of a recipient, if available
Throws:
com.isode.x400.highlevel.X400APIException -
getMessageIPMIdentifier
public java.lang.String getMessageIPMIdentifier()
Returns the message IPM identifier
getMessageIdentifier
public java.lang.String getMessageIdentifier()
Returns the Message Identifier: field
After a message is sent, the MTA assigns a message identifier to the object. This method allows
the sender to retrieve the Message Identifier that was assigned, so it can be used for correlation
with an incoming delivery report.
getPrecedenceFromPriority
public static int getPrecedenceFromPriority(X400Msg.Military_Priority mp)
Return an integer value that is equivalent to the military priority
Parameters:
mp Returns:
getPrintableStringParam
public java.util.ArrayList getPrintableStringParam(int param)
Get a message parameter that has a Printable String format.
Parameters:
param - int: One of the X400_att constants
getPriorityFromPrecedence
public static X400Msg.Military_Priority getPriorityFromPrecedence(int
precedence)
Return a military priority based on an integer that represents the precedence
Parameters:
precedence Returns:
getSubmissionTime
public java.lang.String getSubmissionTime()
Returns the Message Submission time: field X.400 Message Submission Time: UTCTime format
YYMMDDHHMMSS<zone>
isMilitaryContentType
public boolean isMilitaryContentType()
Returns true if the message's external content type is P772 (1.3.26.0.4406.0.4.1)
sendMsg
public void sendMsg(Session session_obj)
Submit a message into the Message Store
The session object is the one returned by the relevant getSession() method. Before you call this
method, you need to bind to the Message Store, and obtain the session_object that represents the
connection.
Parameters:
session_obj - Session:
setAllRecipPrecedence
public void setAllRecipPrecedence(int p)
Set the message precedence, a single value that applies to all recipients.
Parameters:
p - : The precedence value to use for all recipients
setBcc
public Recip setBcc(java.lang.String bcc,
X400Msg.DR_Request rep_request,
int ipn_request)
throws X400APIException
Add a blind copy recipient (BCc:), just to the message envelope (not the header)
Parameters:
bcc - String encoded X.400 O/R address of the recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
Throws:
com.isode.x400.highlevel.X400APIException -
setBoolparam
public void setBoolparam(int param,
boolean value)
Set a message parameter that has a Boolean format.
Parameters:
param - int: One of the X400_att constants (see below)
value - boolean: Boolean value of the parameter
setCc
public Recip setCc(java.lang.String cc,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a copy recipient (Cc:), both to the message envelope and header
Parameters:
cc - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
setEnvelopRecipient
public Recip setEnvelopRecipient(java.lang.String to,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a recipient to envelope only
Parameters:
to - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
setFreeFormName
public void setFreeFormName(Recip ms_recip_obj,
java.lang.String ffn)
throws X400APIException
Set the free form name of a recipient (or sender)
Parameters:
ffn Throws:
com.isode.x400.highlevel.X400APIException -
setFrom
public Recip setFrom(java.lang.String from)
throws X400APIException
Set the message FROM: address
Parameters:
from - String encoded X.400 O/R address with the originator address, as it will appear in
the message header. Note that the address that appears in the envelope will be the one
use of the user that binded to the Message Store.
Throws:
com.isode.x400.highlevel.X400APIException -
setIPMHeadingBlindCopyRecipient
public Recip setIPMHeadingBlindCopyRecipient(java.lang.String to,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a blind-copy recipient to IPM Heading only, not the envelope. Not that the message will *not*
be sent to this recipient
Parameters:
to - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
setIPMHeadingCopyRecipient
public Recip setIPMHeadingCopyRecipient(java.lang.String to,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a copy recipient to IPM Heading only, not the envelope. Not that the message will *not* be
sent to this recipient
Parameters:
to - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
setIPMHeadingPrimaryRecipient
public Recip setIPMHeadingPrimaryRecipient(java.lang.String to,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a primary recipient to IPM Heading only, not the envelope. Not that the message will *not* be
sent to this recipient
Parameters:
to - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
setIntParam
public void setIntParam(int param,
int value)
There are attributes of an X.400 message that can be set that are not commonly used. This
method allows setting of these attributes that have int values using a single method. Please refer
to the X.400 recommendations for the documentation of these parameters.
Parameters:
param - int: One of the X400_att constants (see below)
value - int: Integer value of the parameter Current accepted values, taken from the
X400_att, constants are:
X400_N_MTA_REPORT_REQUEST
X400_N_REPORT_REQUEST
X400_N_REPLY_REQUESTED
X400_N_PRIORITY
X400_N_DISCLOSURE
X400_N_IMPLICIT_CONVERSION_PROHIBITED
X400_N_RECIPIENT_REASSIGNMENT_PROHIBITED
X400_N_CONTENT_RETURN_REQUEST
X400_N_DL_EXPANSION_PROHIBITED
X400_N_CONVERSION_WITH_LOSS_PROHIBITED
X400_N_ALTERNATE_RECIPIENT_ALLOWED
X400_N_IMPORTANCE
X400_N_SENSITIVITY
X400_N_AUTOFORWARDED
X400_B_SEC_GEN_MOAC
X400_N_CONTENT_TYPE
X400_N_MMTS_PRIORITY_QUALIFIER
X400_N_EXT_PRIM_PREC
X400_N_EXT_COPY_PREC
X400_N_S4406_SINGLE_WRAP
X400_N_S4406
setMessageIPMIdentifier
public void setMessageIPMIdentifier(java.lang.String mii)
Set the IPM Identifier field of a message.
This method allows the user agent to assign the message being composed an IPM Identifier. This
can be used later on, to correlate a Read Receipt (Inter Personal Notification = IPN).
If this value is not set, a random unique value will be assigned.
Parameters:
mii The IPM Identifier must be in RFC2156 format:
<user-relative-identifier> '*' <std-or-address> ['<' dn '>']
e.g. the string:
"123456-XXXX* /I=T/S=Costen/O=Isode limited/P=Isode/A= /C=gb/<cn=tim
costen,o=isode limited,c=gb>
setMilitaryContentType
public void setMilitaryContentType()
Set the message external content type to be P772 (1.3.26.0.4406.0.4.1)
setPriority
public void setPriority(X400Msg.Military_Priority primary,
X400Msg.Military_Priority copy)
Set the message priority, using the standard military message priorities values for the primary and
the copy precedence
Parameters:
primary copy -
setPriority
public void setPriority(X400Msg.X400_Priority pr)
Set the message priority, using one of the standard X.400 message priorities
Parameters:
pr -
setRecipient
public Recip setRecipient(boolean envelope,
int r_type,
java.lang.String oraddress,
X400Msg.DR_Request rep_request,
int ipn_request)
Set a message recipient
Parameters:
envelope - boolean : include it in the envelope too
r_type - int : Recipient type (see below)
oraddress - String: String encoded X.400 O/R address
rep_request - int: Integer value for the Delivery Report request
ipn_request - int: Integer value for the IPN request Current accepted values for r_type are:
X400_RECIP_PRIMARY
X400_RECIP_CC
X400_RECIP_BCC
setRecipient
public Recip setRecipient(int r_type,
java.lang.String oraddress,
X400Msg.DR_Request rep_request,
int ipn_request)
Set a message recipient
Parameters:
r_type - int : Recipient type (see below)
oraddress - String: String encoded X.400 O/R address
rep_request - int: Integer value for the Delivery Report request
ipn_request - int: Integer value for the IPN request Current accepted values for r_type are:
X400_RECIP_PRIMARY
X400_RECIP_CC
X400_RECIP_BCC
setSecurityLabel
public void setSecurityLabel(JRSecurityLabel sec_label)
Add a security label as a JRSecurityLabel object
Parameters:
sec_label -
setStringparam
public void setStringparam(int param,
java.lang.String value)
There are attributes of an X.400 message that can be set that are not commonly used. This
method allows setting of these attributes that have String values using a single method. Please
refer to the X.400 recommendations for the documentation of these parameters. Set a message
parameter that has a String format.
Parameters:
value - String: String value of the parameter
param - int: One of the X400_att constants (see below) Current accepted values, taken
from the X400_att, constants are:
X400_S_REPLIED_TO_IDENTIFIER
X400_S_OBSOLETED_IPMS
X400_S_RELATED_IPMS
X400_S_EXPIRY_TIME
X400_S_SEC_IDENTITY
X400_S_SEC_IDENTITY_DN
X400_S_SEC_IDENTITY_FILE
X400_S_SEC_IDENTITY_PASSPHRASE
X400_S_SEC_TRUSTED_CERTS_DIR
X400_S_CONTENT_IDENTIFIER
X400_S_CONTENT_FILENAME
X400_S_EXTERNAL_CONTENT_TYPE
X400_S_AUTHORIZATION_TIME:
X400_S_PRECEDENCE_POLICY_ID:
X400_S_ORIGINATORS_REFERENCE:
X400_S_LATEST_DELIVERY_TIME:
X400_S_DEFERRED_DELIVERY_TIME:
Current accepted values, taken from the AMHS_att, constants are:
ATS_S_PRIORITY_INDICATOR:
ATS_S_FILING_TIME:
ATS_S_OPTIONAL_HEADING_INFO:
ATS_S_TEXT:
setSubject
public void setSubject(java.lang.String subject)
Set the message Subject: field
Parameters:
subject - String: Subject of the message
setTextBody
public void setTextBody(java.lang.String textbody)
Set the message content (as a single IA5 text bodypart)
Parameters:
textbody - The string representation of the content of the message, in a simple IA5 string.
setTo
public Recip setTo(java.lang.String to,
X400Msg.DR_Request rep_request,
int ipn_request)
Add a primary recipient (TO:), both to the message envelope and header
Parameters:
to - String: String encoded X.400 O/R address of this recipient
rep_request - Delivery Report Request for this recipient
ipn_request - IPN Request for this recipient
com.isode.x400.highlevel
Class X400Msg.DR_Request
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.X400Msg.DR_Request
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class X400Msg.DR_Request
extends java.lang.Enum
The originator or a message can request the MTA to generate a delivery report for a particular recipient.
The requests are per-recipient, and they don't have to be all the same.
Fields
AUDITED_REPORT
public static final X400Msg.DR_Request AUDITED_REPORT
Request the MTA to generate an Audited Delivery Report in every case, both when the message
is delivered, this recipient, and also when it's not delivered to this recipient
DR_DELIVERY_REPORT
public static final X400Msg.DR_Request DR_DELIVERY_REPORT
Request the MTA to generate a Delivery Report in every case, both when the message is
delivered, this recipient, and also when it's not delivered to this recipient
DR_NON_DELIVERY_REPORT
public static final X400Msg.DR_Request DR_NON_DELIVERY_REPORT
Request the MTA to generate a Delivery Report only when the message is not delivered to this
recipient
DR_NO_REPORT
public static final X400Msg.DR_Request DR_NO_REPORT
Request the MTA never to generate a Delivery Report, even when the message is not delivered to
this recipient
dr
public final int dr
Methods
valueOf
public static X400Msg.DR_Request valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.X400Msg.DR_Request[] values()
com.isode.x400.highlevel
Class X400Msg.Military_Priority
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.X400Msg.Military_Priority
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class X400Msg.Military_Priority
extends java.lang.Enum
There are six standard values for military message priority in X.400. X.400 MTAs will handle messages
differently based on their priority. This information may also be shown to the end user by their User Agent.
Fields
DEFERRED_PRIORITY_VAL
public static final X400Msg.Military_Priority DEFERRED_PRIORITY_VAL
FLASH_PRIORITY_VAL
public static final X400Msg.Military_Priority FLASH_PRIORITY_VAL
IMMEDIATE_PRIORITY_VAL
public static final X400Msg.Military_Priority IMMEDIATE_PRIORITY_VAL
OVERRIDE_PRIORITY_VAL
public static final X400Msg.Military_Priority OVERRIDE_PRIORITY_VAL
PRIORITY_PRIORITY_VAL
public static final X400Msg.Military_Priority PRIORITY_PRIORITY_VAL
ROUTINE_PRIORITY_VAL
public static final X400Msg.Military_Priority ROUTINE_PRIORITY_VAL
priority
public final int priority
Methods
valueOf
public static X400Msg.Military_Priority valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.X400Msg.Military_Priority[] values()
com.isode.x400.highlevel
Class X400Msg.X400_Message_Type
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.X400Msg.X400_Message_Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class X400Msg.X400_Message_Type
extends java.lang.Enum
Represents one of the message types (message, report, probe or submitted message).
Fields
MESSAGE_TYPE_MESSAGE
public static final X400Msg.X400_Message_Type MESSAGE_TYPE_MESSAGE
A message of type IPM (InterPersonal Message) (Used in Envelope and Content)
MESSAGE_TYPE_PROBE
public static final X400Msg.X400_Message_Type MESSAGE_TYPE_PROBE
A message of type Probe (Used in Envelope only)
MESSAGE_TYPE_REPORT
public static final X400Msg.X400_Message_Type MESSAGE_TYPE_REPORT
A message of type DR (Delivery Report) (Used in Envelope, Report content and optional returned
content)
MESSAGE_TYPE_SUBMITTED
public static final X400Msg.X400_Message_Type MESSAGE_TYPE_SUBMITTED
A message of type Submitted Message (the ones sent by the user) (Used in Envelope and
Content)
type
public final int type
Methods
valueOf
public static X400Msg.X400_Message_Type valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.X400Msg.X400_Message_Type[] values()
com.isode.x400.highlevel
Class X400Msg.X400_Priority
java.lang.Object
|
+--java.lang.Enum
|
+--com.isode.x400.highlevel.X400Msg.X400_Priority
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
< Fields > < Methods >
public static final class X400Msg.X400_Priority
extends java.lang.Enum
There are three standard values for message priority in X.400. X.400 MTAs will handle messages
differently based on their priority. This information may also be shown to the end user by their User Agent.
Fields
HIGH_PRIORITY
public static final X400Msg.X400_Priority HIGH_PRIORITY
LOW_PRIORITY
public static final X400Msg.X400_Priority LOW_PRIORITY
NORMAL_PRIORITY
public static final X400Msg.X400_Priority NORMAL_PRIORITY
priority
public final int priority
Methods
valueOf
public static X400Msg.X400_Priority valueOf(java.lang.String name)
values
public static com.isode.x400.highlevel.X400Msg.X400_Priority[] values()
INDEX
A
D
acquireSemaphore ... 40
addBodypart ... 68
addExistingBodypart ... 68
addMessageForwardBodypart ... 69
addSecurityLabelAsBER ... 69
addSecurityLabelAsXMLFileName ... 69
addSecurityLabelAsXMLString ... 69
available ... 38
ARABIC ... 29
AUDITED_REPORT ... 82
B
delete ... 49
delete ... 70
deleteMessage ... 45
deleteMessageObject ... 46
disable_config_requests ... 39
dr ... 82
DEFERRED_PRIORITY_VAL ... 83
DR_DELIVERY_REPORT ... 82
DR_NO_REPORT ... 82
DR_NON_DELIVERY_REPORT ... 82
E
bind ... 40
bind ... 45
bodypart_size ... 7
bodypart_type ... 7
bound ... 38
buildMsg ... 70
BadDNException ... 6
BadDNException ... 6
BadDNException ... 6
Bodypart ... 7
Bodypart ... 8
Bodypart ... 8
BODYPART_ACP127DATA ... 12
BODYPART_ADATP3 ... 12
BODYPART_BINARY ... 13
BODYPART_CORRECTIONS ... 13
BODYPART_FTBP ... 13
BODYPART_FWD_CONTENT ... 13
BODYPART_FWDENC ... 13
BODYPART_GENERAL_TEXT ... 13
BODYPART_IA5_TEXT ... 13
BODYPART_ISO8859_1 ... 13
BODYPART_ISO8859_2 ... 14
BODYPART_MESSAGE ... 14
BODYPART_MM ... 14
Bodypart.Bodypart_Type ... 12
BodypartForwardedMessage ... 21
BodypartForwardedMessage ... 22
BodypartForwardedMessage ... 22
BodypartFTBP ... 14
BodypartFTBP ... 15
BodypartFTBP ... 15
BodypartFTBP ... 16
BodypartGeneralText ... 24
BodypartGeneralText ... 24
BodypartGeneralText ... 25
BodypartGeneralText ... 25
BodypartGeneralText ... 25
BodypartGeneralText ... 26
BodypartGeneralText.Charset ... 29
BodypartIA5Text ... 30
BodypartIA5Text ... 31
C
credentials ... 38
CYRILLIC ... 29
EAST_EUROPEAN ... 29
F
finalize ... 49
finalize ... 70
finishWithMessage ... 49
FETCHED ... 36
FileException ... 32
FileException ... 33
FileException ... 33
FLASH_PRIORITY_VAL ... 83
getRefreshNumberOfMessages ... 46
getRepertoire ... 31
getReplyRequest ... 61
getReportContentAsText ... 56
getSecurityLabelAsBER ... 56
getSender ... 34
getSequenceNumber ... 35
getSession ... 40
getSize ... 9
getSize ... 18
getSize ... 27
getStatus ... 35
getStringParam ... 10
getStringParam ... 57
getStringRepresentation ... 18
getStringRepresentation ... 23
getStringRepresentation ... 27
getStringRepresentation ... 31
getSubject ... 35
getSubject ... 57
getSubjectID ... 35
getSubmissionTime ... 35
getSubmissionTime ... 72
getTextContent ... 27
getTextContent ... 32
getTextContent ... 57
getToRecipients ... 57
getTraceInformation ... 58
getTraceInformation ... 64
getTraceInfoString ... 64
getType ... 10
getType ... 35
getTypeAsString ... 10
getTypeAsString ... 58
getX400Priority ... 58
GREEK ... 29
G
generateIPN ... 50
getApplicationReferenceOID ... 16
getApplicationReferenceString ... 16
getBccRecipients ... 50
getBodyData ... 17
getBodypart ... 50
getBodypartObject ... 8
getByteParam ... 9
getCcRecipients ... 50
getCharset ... 26
getCharsetString ... 26
getContentBytes ... 70
getContentDescription ... 17
getContentType ... 34
getContLength ... 34
getCopyPrecedence ... 51
getCreationDate ... 17
getDLExpansionHistory ... 51
getDN ... 60
getEnvelopeRecipients ... 51
getFileName ... 17
getFreeFormName ... 60
getFreeFormName ... 71
getFrom ... 51
getFwdMessage ... 23
getFwdMSMessage ... 22
getImportance ... 52
getInternalTraceInformation ... 52
getInternalTraceInformation ... 64
getIntParam ... 9
getIntParam ... 52
getIPMHeaderRecipients ... 51
getIPNContentAsText ... 52
getJRSecurityLabel ... 53
getLocalizedMessage ... 66
getMessageDeliveryTime ... 53
getMessageDeliveryTimeAsDate ... 53
getMessageIdentifier ... 53
getMessageIdentifier ... 71
getMessageIPMIdentifier ... 71
getMessageSubmissionTime ... 53
getMessageSubmissionTimeAsDate ... 54
getMessageType ... 54
getMilitaryPriority ... 54
getModificationDate ... 18
getMsgID ... 34
getMsgPrecedence ... 54
getNativeErrorCode ... 66
getNativeErrorString ... 66
getNotificationRequest ... 60
getNumberOfBodyparts ... 55
getORAddress ... 61
getOriginatorFreeFormName ... 55
getOriginatorORAddress ... 55
getPrecedence ... 61
getPrecedenceFromPriority ... 71
getPrimaryPrecedence ... 55
getPrintableStringParam ... 56
getPrintableStringParam ... 72
getPriority ... 34
getPriorityFromPrecedence ... 72
getReadDate ... 18
getRecipient ... 63
getRecipients ... 56
getRedirectionHistory ... 56
H
HEBREW ... 29
HIGH_PRIORITY ... 86
I
isAllPositiveIPN ... 58
isBound ... 41
isIPN ... 58
isMilitaryContentType ... 59
isMilitaryContentType ... 72
IMMEDIATE_PRIORITY_VAL ... 83
IPN_NON_RECEIPT_NOTIFICATION ... 67
IPN_RECEIPT_NOTIFICATION ... 67
IPN_RETURN_REQUEST ... 67
L
listMailbox ... 46
LISTED ... 36
ListResult ... 33
ListResult ... 34
ListResult.List_status ... 36
LOW_PRIORITY ... 86
M
S
MESSAGE_TYPE_MESSAGE ... 85
MESSAGE_TYPE_PROBE ... 85
MESSAGE_TYPE_REPORT ... 85
MESSAGE_TYPE_SUBMITTED ... 85
MS_ENTRY_CLASS_STORED_MESSAGES ...
47
MS_ENTRY_CLASS_SUBMITTED_MESSAGES
... 47
N
nativeErrorToString ... 66
NEW ... 36
NORMAL_PRIORITY ... 86
NotBoundException ... 37
NotBoundException ... 37
NotBoundException ... 38
O
OTHER_LATIN ... 29
OVERRIDE_PRIORITY_VAL ... 83
P
pa ... 39
priority ... 84
priority ... 86
P3BindSession ... 38
P3BindSession ... 39
P3BindSession ... 40
P772_OID ... 67
P7BindSession ... 44
P7BindSession ... 44
P7BindSession ... 45
P7BindSession.Entry_Class ... 47
PRIORITY_PRIORITY_VAL ... 84
R
receiveNextAvailableMessage ... 41
releaseSemaphore ... 41
ReceiveMsg ... 48
ReceiveMsg ... 48
ReceiveMsg ... 48
ReceiveMsg ... 49
Recipient ... 59
Recipient ... 59
Recipient ... 60
RecipientTools ... 62
RecipientTools ... 63
ROUTINE_PRIORITY_VAL ... 84
saveBP ... 10
saveBP ... 27
saveFTBPInDir ... 19
sec_init ... 39
sendMsg ... 72
setAllRecipPrecedence ... 73
setApplicationReference ... 19
setApplicationReferenceOID ... 19
setBcc ... 73
setBodyData ... 20
setBoolparam ... 73
setByteParam ... 11
setCc ... 73
setCharset ... 28
setContentDescription ... 20
setContentFromFile ... 28
setCreationDate ... 20
setDisableConfigRequest ... 41
setDN ... 61
setEnvelopRecipient ... 74
setFileName ... 21
setFreeFormName ... 61
setFreeFormName ... 74
setFrom ... 74
setFTBPSize ... 20
setFwdMessage ... 23
setFwdMSMessage ... 23
setIntParam ... 11
setIntParam ... 76
setIPMHeadingBlindCopyRecipient ... 75
setIPMHeadingCopyRecipient ... 75
setIPMHeadingPrimaryRecipient ... 75
setMessageIPMIdentifier ... 77
setMilitaryContentType ... 77
setModificationDate ... 21
setNotificationRequest ... 61
setORAddress ... 62
setPrecedence ... 62
setPriority ... 77
setPriority ... 78
setReadDate ... 21
setRecipient ... 78
setRecipient ... 78
setRepertoire ... 32
setReplyRequest ... 62
setSecurityEnv ... 42
setSecurityEnvPKCS12 ... 42
setSecurityLabel ... 79
setSize ... 11
setSize ... 28
setStringparam ... 80
setStringParam ... 12
setSubject ... 81
setTextBody ... 81
setTextContent ... 28
setTextContent ... 32
setTo ... 81
setUserDN ... 43
status ... 36
stringVal ... 30
summarize_on_bind ... 44
T
toString ... 30
toString ... 62
type ... 85
TraceInfoElementItem ... 63
TraceInfoElementItem ... 63
TraceInformation ... 64
TraceInformation ... 64
U
unbind ... 43
user_dn ... 39
user_oraddr ... 39
V
valueOf ... 14
valueOf ... 30
valueOf ... 37
valueOf ... 47
valueOf ... 82
valueOf ... 84
valueOf ... 85
valueOf ... 86
values ... 14
values ... 30
values ... 37
values ... 47
values ... 83
values ... 84
values ... 85
values ... 87
W
waitForNewMessages ... 43
WEST_EUROPEAN ... 30
X
X400APIException ... 65
X400APIException ... 65
X400APIException ... 65
X400Msg ... 67
X400Msg ... 68
X400Msg ... 68
X400Msg ... 68
X400Msg.DR_Request ... 81
X400Msg.Military_Priority ... 83
X400Msg.X400_Message_Type ... 84
X400Msg.X400_Priority ... 86