Nuxeo Enterprise Platform 5.4

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 java.lang.String DEFAULT_LOCATOR
           
static java.lang.String INVOKER_NAME
           
static ComponentName NAME
           
 
Constructor Summary
RemotingService()
           
 
Method Summary
 void activate(ComponentContext context)
          Activates the component.
static Server connect(java.lang.String locatorURI)
           
static Server connect(java.lang.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 java.lang.String getServerURI(java.lang.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(java.lang.String[] args)
           
static java.lang.String ping(java.lang.String host, int port)
          Deprecated. should no more be used - use instead AutoConfigurationService
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
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 java.lang.String INVOKER_NAME
See Also:
Constant Field Values

NAME

public static final ComponentName NAME

DEFAULT_LOCATOR

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

RemotingService

public RemotingService()
Method Detail

connect

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

connect

public static Server connect(java.lang.String host,
                             int port)
                      throws java.lang.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:
java.lang.Exception

disconnect

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


getServerURI

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


ping

@Deprecated
public static java.lang.String ping(java.lang.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 java.lang.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:
java.lang.Exception - if an error occurs during activation

getServerLocator

public InvokerLocator getServerLocator()

getTransporterServer

public TransporterServer getTransporterServer()

deactivate

public void deactivate(ComponentContext context)
                throws java.lang.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:
java.lang.Exception - if an error occurs during activation

getServer

public Server getServer()

isServer

public boolean isServer()

main

public static void main(java.lang.String[] args)

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.