|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.opensync.engine.server.OpenSync
This class represents the OpenSync application
| Nested Class Summary | |
(package private) class |
OpenSync.Flag
|
| Field Summary | |
protected AppFrm |
appFrame
The frame of the application |
protected static java.lang.String[] |
args
The command arguments |
protected ConfigDoc |
configDoc
The config document |
protected static DatabaseManager |
dbMgr
The internal XML database server for incremental synchronizations |
protected java.lang.String |
home
The home directory of the OpenSync application |
protected boolean |
incrementalMode
|
protected static OpenSync |
instance
The instance of the OpenSync server |
protected java.util.Locale |
locale
|
protected Log |
log
The log |
protected PoolManager |
poolManager
The pool manager |
protected OpenSyncProps |
properties
The properties of the application |
protected TasksScheduler |
tasksScheduler
The task scheduler |
| Constructor Summary | |
OpenSync()
Create the OpenSync object |
|
| Method Summary | |
static java.lang.Process |
executeCmd(java.lang.String command)
|
AppFrm |
getAppFrame()
Get the application Frame |
ConfigDoc |
getConfigDoc()
Get the config document |
java.lang.String |
getDirectoryPath(java.lang.String directory,
boolean check)
Get of the absolute path of a directory (OpenSync_HOME + directory) |
java.lang.String |
getFilePath(java.lang.String fileName,
boolean check)
Get of the absolute path of a file (OpenSync_HOME + file) |
java.lang.String |
getHome()
|
boolean |
getIncrementalMode()
Get the incremental mode |
static OpenSync |
getInstance()
Get the instance of the OpenSync object (singleton) |
java.util.Locale |
getLocale()
|
Log |
getLog()
Get the log |
PoolManager |
getPoolManager()
Get the pool manager |
OpenSyncProps |
getProperties()
Get the properties of the application |
protected void |
init()
Initialize the OpenSync application |
protected void |
init(Task task)
Register the log object to all tasks |
void |
loadProperties()
|
boolean |
loadState()
Load the state of the server |
static void |
main(java.lang.String[] args)
The main of the OpenSync application |
protected void |
notification()
|
static void |
restart()
Restart the server |
void |
saveState()
Save the state of the server |
void |
saveStateNotWorkingUnderAix()
|
void |
setAppFrame(AppFrm appFrame)
Set the application Frame |
void |
setHome(java.lang.String home)
|
protected static void |
setInstance()
Set the instance of the OpenSync object (singleton) |
void |
setLocale(java.util.Locale locale)
|
void |
setLog(Log log)
|
void |
setProperties(OpenSyncProps properties)
|
protected void |
start()
Start the OpenSync server |
static void |
startXMLDatabase()
|
void |
taskFail(TaskEvent event)
Implements the TaskListenr interface |
void |
taskStart(TaskEvent event)
Implements the TaskListenr interface |
void |
taskStop(TaskEvent event)
Implements the TaskListenr interface |
static void |
usage()
Print the usage of the command line |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static OpenSync instance
protected static DatabaseManager dbMgr
protected ConfigDoc configDoc
protected Log log
protected TasksScheduler tasksScheduler
protected AppFrm appFrame
protected PoolManager poolManager
protected java.lang.String home
protected java.util.Locale locale
protected boolean incrementalMode
protected static java.lang.String[] args
protected OpenSyncProps properties
| Constructor Detail |
public OpenSync()
| Method Detail |
public static OpenSync getInstance()
protected static void setInstance()
protected void start()
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
OpenSyncException,
org.xml.sax.SAXException
OpenSyncException
java.io.IOException
org.xml.sax.SAXException
DocumentException
javax.xml.parsers.ParserConfigurationExceptionpublic void taskStart(TaskEvent event)
taskStart in interface TaskListenerevent - the task eventpublic void taskFail(TaskEvent event)
taskFail in interface TaskListenerevent - the task eventpublic void taskStop(TaskEvent event)
taskStop in interface TaskListenerevent - the task event
protected void notification()
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
javax.mail.MessagingException,
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
javax.mail.MessagingException
java.io.IOExceptionprotected void init()
protected void init(Task task)
task -
public java.lang.String getDirectoryPath(java.lang.String directory,
boolean check)
throws java.io.FileNotFoundException
directory - the directorycheck - check if it exists
java.io.FileNotFoundException
public java.lang.String getFilePath(java.lang.String fileName,
boolean check)
throws java.io.FileNotFoundException
fileName - the file namecheck - check if it exists
java.io.FileNotFoundExceptionpublic OpenSyncProps getProperties()
public PoolManager getPoolManager()
public Log getLog()
public ConfigDoc getConfigDoc()
public boolean getIncrementalMode()
public AppFrm getAppFrame()
public void setAppFrame(AppFrm appFrame)
appFrame - the frame a the applicationpublic static void restart()
public void loadProperties()
throws OpenSyncException,
java.io.IOException,
java.io.FileNotFoundException
OpenSyncException
java.io.IOException
java.io.FileNotFoundExceptionpublic static void startXMLDatabase()
public static void main(java.lang.String[] args)
args - the arguments
public static java.lang.Process executeCmd(java.lang.String command)
throws java.io.IOException
java.io.IOExceptionpublic static void usage()
public void saveState()
public void saveStateNotWorkingUnderAix()
public boolean loadState()
throws org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
OpenSyncException
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
OpenSyncExceptionpublic void setProperties(OpenSyncProps properties)
properties - The properties to set.public java.lang.String getHome()
public void setHome(java.lang.String home)
home - The home to set.public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
locale - The locale to set.public void setLog(Log log)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||