cz.cuni.amis.nb.api.pogamut.base.server
Class DefaultServersManager<T extends ServerDefinition>

Package class diagram package DefaultServersManager
java.lang.Object
  extended by cz.cuni.amis.nb.api.pogamut.base.server.DefaultServersManager<T>
All Implemented Interfaces:
ServersManager<T>

public abstract class DefaultServersManager<T extends ServerDefinition>
extends Object
implements ServersManager<T>

Author:
ik

Field Summary
protected  cz.cuni.amis.utils.collections.ObservableList<T> servers
           
protected  String serversListFileName
           
 
Constructor Summary
DefaultServersManager(String serverType)
           
 
Method Summary
abstract  void deserialize()
          Saves the server definition in a binary file.
 cz.cuni.amis.utils.collections.ObservableCollection<T> getAllServers()
          Returns collection of all servers.
 cz.cuni.amis.utils.flag.Flag<T> getDefaultServer()
          Returns the default server.
protected  org.openide.filesystems.FileObject getServerListFile()
           
 String getServerType()
          String type of the servers.
 void removeServer(T server)
          Removes this servel from the list.
 void serialize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serversListFileName

protected String serversListFileName

servers

protected cz.cuni.amis.utils.collections.ObservableList<T extends ServerDefinition> servers
Constructor Detail

DefaultServersManager

public DefaultServersManager(String serverType)
Method Detail

getDefaultServer

public cz.cuni.amis.utils.flag.Flag<T> getDefaultServer()
Description copied from interface: ServersManager
Returns the default server. This server can be used as target for some actions.

Specified by:
getDefaultServer in interface ServersManager<T extends ServerDefinition>
Returns:

getAllServers

public cz.cuni.amis.utils.collections.ObservableCollection<T> getAllServers()
Description copied from interface: ServersManager
Returns collection of all servers.

Specified by:
getAllServers in interface ServersManager<T extends ServerDefinition>
Returns:

deserialize

public abstract void deserialize()
Saves the server definition in a binary file.

Specified by:
deserialize in interface ServersManager<T extends ServerDefinition>

serialize

public void serialize()
Specified by:
serialize in interface ServersManager<T extends ServerDefinition>

getServerListFile

protected org.openide.filesystems.FileObject getServerListFile()
                                                        throws IOException
Throws:
IOException

getServerType

public String getServerType()
Description copied from interface: ServersManager
String type of the servers. Usually a protocol that they can handle.

Specified by:
getServerType in interface ServersManager<T extends ServerDefinition>
Returns:

removeServer

public void removeServer(T server)
Description copied from interface: ServersManager
Removes this servel from the list.

Specified by:
removeServer in interface ServersManager<T extends ServerDefinition>


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.