Class FileInterfaceWriter
java.lang.Object
ch.software_atelier.simpleflex.interfaces.file.FileInterfaceWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intreturned by reason() if everything was OKstatic intreturned by reason() if the file was already existing on calling execute().static intreturned by reason() ifstatic intreturned by reason() if the timeout between writing and reading by the Server-Interface is expired. -
Constructor Summary
ConstructorsConstructorDescriptionFileInterfaceWriter(File dst) Creates a New Instance of FileInterfaceWriter. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(String classPath, String[][] args) Adds a Command that is needed to execute over FileInterface.intReturns the reason of returning false in calling execute() the last time.booleanexecute()Writes the fileinterface file.
-
Field Details
-
ERRORCODE_TIMEOUT_EXPIERD
public static int ERRORCODE_TIMEOUT_EXPIERDreturned by reason() if the timeout between writing and reading by the Server-Interface is expired. -
ERRORCODE_FILE_ALREADY_EXISTS
public static int ERRORCODE_FILE_ALREADY_EXISTSreturned by reason() if the file was already existing on calling execute(). -
ERRORCODE_IOEXCEPTION
public static int ERRORCODE_IOEXCEPTIONreturned by reason() if -
ERRORCODE_EVERYTHING_OK
public static int ERRORCODE_EVERYTHING_OKreturned by reason() if everything was OK
-
-
Constructor Details
-
FileInterfaceWriter
Creates a New Instance of FileInterfaceWriter.
This class is used to simplify the write-process of
standard interface commands.- Parameters:
dst- Where to white the File. It's the same Path as specified in the main-config of simpleflex.
-
-
Method Details
-
addCommand
Adds a Command that is needed to execute over FileInterface.- Parameters:
classPath- The classpath to the needed fileinterfaceargs- The arguments that
-
execute
public boolean execute()Writes the fileinterface file. It waits until the file is deleted (which means, That the File was defently readed by the Server) or till the timeout expires. But there is no warrenty, that all tasks are processed! To be shore, ask the logfile...- Returns:
- true, if the File was successful written and deleted.
On false, errorReason() gives more details.
-
errorReason
public int errorReason()Returns the reason of returning false in calling execute() the last time.- Returns:
-