fr.cnes.sitools.server
Class Starter

java.lang.Object
  extended by fr.cnes.sitools.server.Starter

public final class Starter
extends java.lang.Object

Server Starting class.

Author:
AKKA Technologies

Field Summary
static java.lang.String BUNDLE
          Resource bundle name
static int DEFAULT_CONNECTIONS
          Maximal connections
 
Method Summary
static org.restlet.Application getApplication(int hostindex)
          For Test purpose
static void initStatusService(SitoolsSettings settings, java.lang.String baseUrl, org.restlet.Component component)
          Initialize the status service on the given component
static org.restlet.routing.VirtualHost initVirtualHost(org.restlet.Context vhostContext, SitoolsSettings settings)
          Initialize the virtual host
static void main(java.lang.String[] args)
          Run the server as a stand-alone component.
static void start(java.lang.String hostname, int port, java.lang.String publicHostName)
          Builds and starts the server component.
static void startWithProxy(java.lang.String[] args, SitoolsSettings settings)
          setup proxy configuration Default none.
static void stop()
          STOP server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE

public static final java.lang.String BUNDLE
Resource bundle name

See Also:
Constant Field Values

DEFAULT_CONNECTIONS

public static final int DEFAULT_CONNECTIONS
Maximal connections

See Also:
Constant Field Values
Method Detail

getApplication

public static org.restlet.Application getApplication(int hostindex)
For Test purpose

Parameters:
hostindex - no d'ordre d'application attachée au composant.
Returns:
Application

main

public static void main(java.lang.String[] args)
Run the server as a stand-alone component.

Parameters:
args - The optional arguments.

startWithProxy

public static void startWithProxy(java.lang.String[] args,
                                  SitoolsSettings settings)
setup proxy configuration Default none.

Parameters:
args - The optional arguments.
settings - SitoolsSettings

start

public static void start(java.lang.String hostname,
                         int port,
                         java.lang.String publicHostName)
                  throws java.lang.Exception
Builds and starts the server component.

Parameters:
hostname - host name default "localhost"
port - port HTTP for server / virtual host . Default 8182
publicHostName - public host reference of server
Throws:
java.lang.Exception - always possible

stop

public static void stop()
STOP server


initStatusService

public static void initStatusService(SitoolsSettings settings,
                                     java.lang.String baseUrl,
                                     org.restlet.Component component)
                              throws java.lang.Exception
Initialize the status service on the given component

Parameters:
settings - The SitoolsSettings object
baseUrl - the baseUrl
component - the component in which to add the status service
Throws:
java.lang.Exception - if something is wrong

initVirtualHost

public static org.restlet.routing.VirtualHost initVirtualHost(org.restlet.Context vhostContext,
                                                              SitoolsSettings settings)
Initialize the virtual host

Parameters:
vhostContext - the context with which to create the host
settings - the SitoolsSettings object
Returns:
VirtualHost the VirtualHost created


Copyright © 2010-2013 CNES. All Rights Reserved.