org.eclipse.emf.emfstore.client
Interface ESServerFactory

All Superinterfaces:
ESFactory
All Known Implementing Classes:
ESServerFactoryImpl

public interface ESServerFactory
extends ESFactory

Factory for creating ESServer instances.

Author:
wesendon, emueller

Method Summary
 ESServer createAndStartLocalServer()
          Creates a server with a local name and launches a server process locally.
 ESServer createServer(String url, int port, String certificate)
          Creates a server without a local name.
 ESServer createServer(String name, String url, int port, String certificate)
          Creates a server with a local name.
 void stopLocalServer()
          Stop the local server if it has been started.
 

Method Detail

createServer

ESServer createServer(String url,
                      int port,
                      String certificate)
Creates a server without a local name. The created server is not automatically added to the workspace, i.e. most users will call ESWorkspace.addServer(ESServer) in order to to avoid DanglingHREFExceptions upon saving.

Parameters:
url - the URL of the server
port - the port of the server where EMFStore is listing on
certificate - the certificate alias to be used
Returns:
an ESServer instance representing the remote server
See Also:
org.eclipse.emf.emfstore.client.ESWorkspace#addServer(ESServer)}

createServer

ESServer createServer(String name,
                      String url,
                      int port,
                      String certificate)
Creates a server with a local name. The created server is not automatically added to the workspace, i.e. most users will call ESWorkspace.addServer(ESServer) in order to to avoid DanglingHREFExceptions upon saving.

Parameters:
name - the local name of the server
url - the URL of the server
port - the port of the server where EMFStore is listing on
certificate - the certificate alias to be used
Returns:
an ESServer instance representing the remote server
See Also:
org.eclipse.emf.emfstore.client.ESWorkspace#addServer(ESServer)}

createAndStartLocalServer

ESServer createAndStartLocalServer()
                                   throws ESServerStartFailedException
Creates a server with a local name and launches a server process locally. Blocks until server is fully running. Only one local server can be started at any point in time. Calling this method with a serve already running will not launch another server, but just return a new ESServer. The created server is not automatically added to the workspace, i.e. most users will call ESWorkspace.addServer(ESServer) in order to to avoid DanglingHREFExceptions upon saving.

Returns:
an ESServer instance representing the local server on the client side.
Throws:
ESServerStartFailedException - if starting the server fails

stopLocalServer

void stopLocalServer()
Stop the local server if it has been started. Blocks until server has stopped fully.



Copyright © 2015. All Rights Reserved.