Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.remoting
Class RemotingService

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.runtime.remoting.RemotingService
All Implemented Interfaces:
Adaptable, Component, Extensible

public class RemotingService
extends DefaultComponent

Author:
Bogdan Stefanescu

Field Summary
static String DEFAULT_LOCATOR
           
static String INVOKER_NAME
           
static ComponentName NAME
           
 
Constructor Summary
RemotingService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
static Server connect(String locatorURI)
           
static Server connect(String host, int port)
          Helper method to connect to a remote nuxeo runtime server.
 void deactivate(ComponentContext context)
          Deactivates the component.
static void disconnect(Server server)
          Helper method to disconnect from a remote server.
 Server getServer()
           
 InvokerLocator getServerLocator()
           
static String getServerURI(String host, int port)
          Deprecated. must be removed since from runtime 1.5.1 the invoker protocol may be configurable
 TransporterServer getTransporterServer()
           
 boolean isServer()
           
static void main(String[] args)
           
static String ping(String host, int port)
          Deprecated. should no more be used - use instead AutoConfigurationService
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
applicationStarted, getAdapter, registerContribution, registerExtension, unregisterContribution, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVOKER_NAME

public static final String INVOKER_NAME
See Also:
Constant Field Values

NAME

public static final ComponentName NAME

DEFAULT_LOCATOR

public static final String DEFAULT_LOCATOR
See Also:
Constant Field Values
Constructor Detail

RemotingService

public RemotingService()
Method Detail

connect

public static Server connect(String locatorURI)
                      throws Exception
Throws:
Exception

connect

public static Server connect(String host,
                             int port)
                      throws Exception
Helper method to connect to a remote nuxeo runtime server.

Parameters:
host - the remote host
port - the remote port
Returns:
the server object
Throws:
Exception

disconnect

public static void disconnect(Server server)
Helper method to disconnect from a remote server.


getServerURI

@Deprecated
public static String getServerURI(String host,
                                             int port)
Deprecated. must be removed since from runtime 1.5.1 the invoker protocol may be configurable


ping

@Deprecated
public static String ping(String host,
                                     int port)
Deprecated. should no more be used - use instead AutoConfigurationService

Tests the connection with a remote server.

Returns:
the product info if successful, null otherwise

activate

public void activate(ComponentContext context)
              throws Exception
Description copied from interface: Component
Activates the component.

This method is called by the runtime when a component is activated.

Specified by:
activate in interface Component
Overrides:
activate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

getServerLocator

public InvokerLocator getServerLocator()

getTransporterServer

public TransporterServer getTransporterServer()

deactivate

public void deactivate(ComponentContext context)
                throws Exception
Description copied from interface: Component
Deactivates the component.

This method is called by the runtime when a component is deactivated.

Specified by:
deactivate in interface Component
Overrides:
deactivate in class DefaultComponent
Parameters:
context - the runtime context
Throws:
Exception - if an error occurs during activation

getServer

public Server getServer()

isServer

public boolean isServer()

main

public static void main(String[] args)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.