com.informationkinematics.imsforward
Class CTLIOController
java.lang.Object
|
+--com.informationkinematics.imsforward.CTLIOController
- public class CTLIOController
- extends java.lang.Object
Title: CTLIOController
Description: This helper handles the reading and writing of the IMS mail server's control file.
Copyright: Copyright (c) 2001 by Information Kinematics under GNU General Public License
(see package description for more information)
Company: Information Kinematics
- Version:
- 0.9.2
- Author:
- Florian Steinsiepe, Adrian Zaugg
Method Summary |
void |
deleteFile(java.io.File file)
Deletes the given file. |
private boolean |
readBooleanParameter(java.lang.String sLine)
Returns the parameter value of the given "key=value" string as a boolean. |
boolean |
readCTLFile(java.io.File file,
java.lang.String[] sEmail)
Reads the mail server's controller file or its inactivated version. |
private java.lang.String |
readStringParameter(java.lang.String sLine)
Returns the parameter value of the given "key=value" string as a String. |
void |
writeCTLFile(java.io.File file,
java.lang.String sEmail,
boolean bDiscard)
Writes the contents of the mail server's controller file or its inactivated version. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
CTLIOController
public CTLIOController()
- Constructor is inactive.
readCTLFile
public boolean readCTLFile(java.io.File file,
java.lang.String[] sEmail)
throws java.io.IOException
- Reads the mail server's controller file or its inactivated version.
- Parameters:
file
- java.io.FilesEmail
- java.lang.String[1] - provides the pointer, not only the value
of the client's email address string- Returns:
- boolean - whether the mails shall be removed from the server
after being forwarded
writeCTLFile
public void writeCTLFile(java.io.File file,
java.lang.String sEmail,
boolean bDiscard)
throws java.io.IOException
- Writes the contents of the mail server's controller file or its inactivated version.
- Parameters:
file
- java.io.FilesEmail
- java.lang.String[1] - provides the pointer, not only the value
of the client's email address stringbDiscard
- boolean - whether the mails shall be removed from the server
after being forwarded
readStringParameter
private java.lang.String readStringParameter(java.lang.String sLine)
- Returns the parameter value of the given "key=value" string as a String.
- Parameters:
sLine
- java.lang.String- Returns:
- java.lang.String - the value, i.e. the right part of the input
readBooleanParameter
private boolean readBooleanParameter(java.lang.String sLine)
- Returns the parameter value of the given "key=value" string as a boolean.
- Parameters:
sLine
- java.lang.String- Returns:
- boolean - the value, i.e. the right part of the input
deleteFile
public void deleteFile(java.io.File file)
throws java.io.IOException
- Deletes the given file. If the operation fails, the action is retried 10 times,
every 200 milliseconds. In case this isn't possible, a manual IOException is thrown.
- Parameters:
file
- java.io.File