synergynetframework.appsystem.services.net.filestore
Class FileStoreServer

java.lang.Object
  extended by synergynetframework.appsystem.services.SynergyNetService
      extended by synergynetframework.appsystem.services.net.filestore.FileStoreServer
All Implemented Interfaces:
java.lang.Runnable

public class FileStoreServer
extends SynergyNetService
implements java.lang.Runnable

The Class FileStoreServer.


Field Summary
static java.lang.String SERVICE_NAME
          The Constant SERVICE_NAME.
static java.lang.String SERVICE_TYPE
          The Constant SERVICE_TYPE.
static int TCP_PORT
          The Constant TCP_PORT.
 
Constructor Summary
FileStoreServer()
          Instantiates a new file store server.
 
Method Summary
 boolean hasStarted()
          Checks for started.
 void run()
           
 void setDirectory(java.io.File file)
          Sets the directory.
 void shutdown()
          Shutdown.
 void start()
          Start.
 void stop()
          Stop.
 void update()
          Used to avoid threading issues.
 
Methods inherited from class synergynetframework.appsystem.services.SynergyNetService
registerServiceMessageListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The Constant SERVICE_NAME.

See Also:
Constant Field Values

SERVICE_TYPE

public static final java.lang.String SERVICE_TYPE
The Constant SERVICE_TYPE.

See Also:
Constant Field Values

TCP_PORT

public static final int TCP_PORT
The Constant TCP_PORT.

See Also:
Constant Field Values
Constructor Detail

FileStoreServer

public FileStoreServer()
Instantiates a new file store server.

Method Detail

hasStarted

public boolean hasStarted()
Description copied from class: SynergyNetService
Checks for started.

Specified by:
hasStarted in class SynergyNetService
Returns:
true, if successful

run

public void run()
Specified by:
run in interface java.lang.Runnable

setDirectory

public void setDirectory(java.io.File file)
Sets the directory.

Parameters:
file - the new directory

shutdown

public void shutdown()
Description copied from class: SynergyNetService
Shutdown.

Specified by:
shutdown in class SynergyNetService

start

public void start()
           throws CouldNotStartServiceException
Description copied from class: SynergyNetService
Start.

Throws:
CouldNotStartServiceException - the could not start service exception

stop

public void stop()
          throws ServiceNotRunningException
Description copied from class: SynergyNetService
Stop.

Specified by:
stop in class SynergyNetService
Throws:
ServiceNotRunningException - the service not running exception

update

public void update()
Description copied from class: SynergyNetService
Used to avoid threading issues. Should be called periodically to ensure the service updates appropriately.

Specified by:
update in class SynergyNetService