@Internal public class SyncServerImpl extends java.lang.Object implements SyncServer
SyncServer to access functionality,
this class may change without notice.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes and cleans up all resources used by this sync server.
|
protected void |
finalize()
Users of this class should explicitly call
close() instead to avoid expensive finalization. |
int |
getPort()
Gets the port the server has bound to.
|
java.lang.String |
getStatsString()
Gets some statistics from the sync server.
|
java.lang.String |
getUrl()
Gets the URL the server is running at.
|
boolean |
isRunning()
Returns if the server is up and running.
|
void |
setSyncChangeListener(SyncChangeListener changesListener)
Sets a
SyncChangeListener. |
void |
start()
Starts the server (e.g.
|
void |
stop()
Stops the server.
|
public java.lang.String getUrl()
SyncServergetUrl in interface SyncServerpublic int getPort()
SyncServergetPort in interface SyncServerpublic boolean isRunning()
SyncServerisRunning in interface SyncServerpublic java.lang.String getStatsString()
SyncServergetStatsString in interface SyncServerpublic void setSyncChangeListener(@Nullable
SyncChangeListener changesListener)
SyncServerSyncChangeListener. Replaces a previously set listener.
Set to null to remove the listener.setSyncChangeListener in interface SyncServerpublic void start()
SyncServerstart in interface SyncServerpublic void stop()
SyncServerstop in interface SyncServerpublic void close()
SyncServerclose in interface SyncServerclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableprotected void finalize()
throws java.lang.Throwable
close() instead to avoid expensive finalization.finalize in class java.lang.Objectjava.lang.Throwable