Package org.javlo.service.syncro
Class ServerSynchroService
- java.lang.Object
 - 
- org.javlo.service.syncro.AbstractSynchroService<BaseSynchroContext>
 - 
- org.javlo.service.syncro.BaseSynchroService
 - 
- org.javlo.service.syncro.ServerSynchroService
 
 
 
 
- 
public class ServerSynchroService extends BaseSynchroService
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.javlo.service.syncro.BaseSynchroService
BaseSynchroService.FileInfoPathComparator 
 - 
 
- 
Field Summary
- 
Fields inherited from class org.javlo.service.syncro.BaseSynchroService
logger, SERVLET_RELATIVE_PATH 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyAction(BaseSynchroContext context, String path, AbstractSynchroContext.SynchroAction action)Apply the action required for the path.StringbuildURL(String url)protected AbstractSynchroContext.SynchroActiondefineAction(BaseSynchroContext context, String path)Called to define the required action for the specified path.protected voiddeleteDistantDirectories(BaseSynchroContext context)protected voiddeleteLocalDirectories(BaseSynchroContext context)static ServerSynchroServicegetInstance(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String dataFolder)static ServerSynchroServicegetInstanceForMailing(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String mailingFolder)static ServerSynchroServicegetInstanceForMailingHistory(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String mailingHistoryFolder)static ServerSynchroServicegetInstanceForShareFiles(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String shareFolder)static ServerSynchroServicegetInstanceForTemplate(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String templateFolder)StringgetLocalName()Get the name of the local side.protected static HttpClientServicenewHttpClientService(String serverURL, String synchroCode, String proxyHost, int proxyPort)protected voidonShutdown(BaseSynchroContext context)Called every time a synchro run is finished even if aSynchroFatalExceptionis thrown.- 
Methods inherited from class org.javlo.service.syncro.BaseSynchroService
applyActions, buildConflictPath, buildLocalFile, buildLocalFile, copyDistantToLocal, copyLocalToDistant, copyLocalToDistant, deleteDistantFile, deleteLocalFile, getBaseFolderFile, getDistantName, getHttpClientService, initializeContext, isManageDeletedFiles, isRefreshAll, isSplitBigFiles, moveLocalFile, newSynchroContext, onActionsApplied, onFatalException, onNonFatalException, onUncaughtException, pushContext, sendCommand, sendRefresh, setManageDeletedFiles, setRefreshAll, setSplitBigFiles 
- 
Methods inherited from class org.javlo.service.syncro.AbstractSynchroService
defineActions, onActionsDefined, synchronize 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getInstance
public static ServerSynchroService getInstance(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String dataFolder)
 
- 
getInstanceForMailing
public static ServerSynchroService getInstanceForMailing(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String mailingFolder)
 
- 
getInstanceForMailingHistory
public static ServerSynchroService getInstanceForMailingHistory(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String mailingHistoryFolder)
 
- 
getInstanceForTemplate
public static ServerSynchroService getInstanceForTemplate(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String templateFolder)
 
- 
getInstanceForShareFiles
public static ServerSynchroService getInstanceForShareFiles(String localName, String serverURL, String proxyHost, int proxyPort, String synchroCode, String shareFolder)
 
- 
newHttpClientService
protected static HttpClientService newHttpClientService(String serverURL, String synchroCode, String proxyHost, int proxyPort)
 
- 
getLocalName
public String getLocalName()
Description copied from class:AbstractSynchroServiceGet the name of the local side. Can be used in conflict file name.- Specified by:
 getLocalNamein classAbstractSynchroService<BaseSynchroContext>- Returns:
 - the local name
 
 
- 
defineAction
protected AbstractSynchroContext.SynchroAction defineAction(BaseSynchroContext context, String path) throws SynchroNonFatalException, SynchroFatalException
Description copied from class:AbstractSynchroServiceCalled to define the required action for the specified path.- Overrides:
 defineActionin classAbstractSynchroService<BaseSynchroContext>- Parameters:
 context- the currentAbstractSynchroContext- Returns:
 - the required action.
 - Throws:
 SynchroNonFatalExceptionSynchroFatalException
 
- 
applyAction
protected void applyAction(BaseSynchroContext context, String path, AbstractSynchroContext.SynchroAction action) throws SynchroNonFatalException
Description copied from class:AbstractSynchroServiceApply the action required for the path.- Overrides:
 applyActionin classBaseSynchroService- Parameters:
 context- the currentAbstractSynchroContext- Throws:
 SynchroNonFatalException
 
- 
buildURL
public String buildURL(String url)
- Overrides:
 buildURLin classBaseSynchroService
 
- 
onShutdown
protected void onShutdown(BaseSynchroContext context)
Description copied from class:AbstractSynchroServiceCalled every time a synchro run is finished even if aSynchroFatalExceptionis thrown. SeeAbstractSynchroContext.isErrorOccured().
Not called theAbstractSynchroService.newSynchroContext()failed.- Overrides:
 onShutdownin classAbstractSynchroService<BaseSynchroContext>- Parameters:
 context- the currentAbstractSynchroContext
 
- 
deleteDistantDirectories
protected void deleteDistantDirectories(BaseSynchroContext context)
- Overrides:
 deleteDistantDirectoriesin classBaseSynchroService
 
- 
deleteLocalDirectories
protected void deleteLocalDirectories(BaseSynchroContext context)
- Overrides:
 deleteLocalDirectoriesin classBaseSynchroService
 
 - 
 
 -