## com.rbnb.api
Class Server

    java.lang.Object
      com.rbnb.api.Rmap
          com.rbnb.api.Server

All Implemented Interfaces:
  com.rbnb.utility.SortCompareInterface, com.rbnb.utility.SortInterface, Serializable, Cloneable

    public class Server

extends Rmap

Object representing a handle to an RBNB server.

Since:
  V2.0
See Also:
  Serialized Form
Author:
  Ian Brown
Version:
  06/22/2006

Field Summary

Fields inherited from class com.rbnb.api.Rmap
`PATHDELIMITER`

Method Summary
`Object` `clone()` Clones this object.
`Controller` `createController(String nameI)` Creates a `Controller` for this `Server`.
`static Mirror` `createMirror()` Creates a `Mirror`.
`PlugIn` `createPlugIn(String nameI)` Creates a `PlugIn` for this `Server`.
`Controller` `createRAMController(String nameI)` Creates a `Controller` that communicates via RAM.
`PlugIn` `createRAMPlugIn(String nameI)` Creates a `PlugIn` that communicates via RAM.
`Sink` `createRAMSink(String nameI)` Creates a `Sink` that communicates via RAM.
`Source` `createRAMSource(String nameI)` Creates a `Source` that communicates via RAM.
`static Shortcut` `createShortcut(String nameI, String destinationAddressI, double costI)` Creates a `Shortcut` object.
`Sink` `createSink(String nameI)` Creates a `Sink` for this `Server`.
`Source` `createSource(String nameI)` Creates a `Source` for this `Server`.
`String` `getAddress()` Gets the server address.
`boolean` `isRunning()` Is this `Server` running?
`static Server` `launchNewServer(String[] argsI)` Launches a new server based on the command line arguments.
`static void` `main(String[] argsI)` Main DataTurbine `RBNB` method.
`static Server` `newServerHandle(String nameI, String addressI)` Creates a new `Server` handle to an RBNB server.
`void` `setAddress(String addressI)` Sets the server address.
`void` `start()` Starts the RBNB server as a thread in the current process.
`void` `start(String[] argsI)` Starts the RBNB server as a thread in the current process.
`void` `stop()` Stops the RBNB server.

Methods inherited from class com.rbnb.api.Rmap

`addChannel, addChild, addChildAt, addDataWithTimeReference, addMember, clone, collapse, compareNames, compareNames, compareNames, compareTo, compareTo, createFromName, extract, extract, extractFolders, extractFoldersAndChannels, extractNames, extractRmap, findChild, findDescendant, findMember, getChildAt, getChildren, getDblock, getFrange, getFullName, getMemberAt, getMembers, getName, getNchildren, getNmembers, getParent, getTrange, isImplemented, markLeaf, mergeWith, moveToBottom, moveToTop, nullify, removeChild, removeChildAt, removeMember, removeMemberAt, setDblock, setFrange, setName, setTrange, sortField, toNameHierarchy, toString, toString, xmlRegistration, xmlRegistration`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.rbnb.api.RmapInterface
`addChild, compareNames, compareNames, compareTo, findChild, findDescendant, getFullName, getName, getParent, removeChild, removeChildAt, setName, toString, toString`

Method Detail

### createController

    public final Controller createController(String nameI)
                                      throws AddressException,
                                             SerializeException,
                                             InterruptedIOException,
                                             IOException,
                                             InterruptedException

  Creates a `Controller` for this `Server`.

  Parameters:
    `nameI` - the name of the `Controller`.
  Returns:
    the `Controller`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createRAMController(String nameI)`
  Author:
    Ian Brown
  Version:
    05/15/2001

### createMirror

    public static final Mirror createMirror()

  Creates a `Mirror`.

  Returns:
    the `Mirror`.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    04/17/2001

### createPlugIn

    public final PlugIn createPlugIn(String nameI)
                              throws AddressException,
                                     SerializeException,
                                     InterruptedIOException,
                                     IOException,
                                     InterruptedException

  Creates a `PlugIn` for this `Server`.

  Parameters:
    `nameI` - the name of the `PlugIn`.
  Returns:
    the `PlugIn`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createRAMPlugIn(String nameI)`
  Author:
    Ian Brown
  Version:
    01/14/2002

### createRAMController

    public final Controller createRAMController(String nameI)
                                         throws AddressException,
                                                SerializeException,
                                                InterruptedIOException,
                                                IOException,
                                                InterruptedException

  Creates a `Controller` that communicates via RAM.

  Parameters:
    `nameI` - the name of the `Controller`
  Returns:
    the `Controller`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createController(String nameI)`
  Author:
    Ian Brown
  Version:
    05/15/2001

### createRAMPlugIn

    public final PlugIn createRAMPlugIn(String nameI)
                                 throws AddressException,
                                        SerializeException,
                                        InterruptedIOException,
                                        IOException,
                                        InterruptedException

  Creates a `PlugIn` that communicates via RAM.

  Parameters:
    `nameI` - the name of the `PlugIn`
  Returns:
    the `PlugIn`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createPlugIn(String nameI)`
  Author:
    Ian Brown
  Version:
    01/14/2002

### createRAMSink

    public final Sink createRAMSink(String nameI)
                             throws AddressException,
                                    SerializeException,
                                    InterruptedIOException,
                                    IOException,
                                    InterruptedException

  Creates a `Sink` that communicates via RAM.

  Parameters:
    `nameI` - the name of the `Sink`
  Returns:
    the `Sink`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createSink(String nameI)`
  Author:
    Ian Brown
  Version:
    05/15/2001

### createRAMSource

    public final Source createRAMSource(String nameI)
                                 throws AddressException,
                                        SerializeException,
                                        InterruptedIOException,
                                        IOException,
                                        InterruptedException

  Creates a `Source` that communicates via RAM.

  Parameters:
    `nameI` - the name of the `Source`
  Returns:
    the `Source`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createSource(String nameI)`
  Author:
    Ian Brown
  Version:
    05/11/2001

### createShortcut

    public static final Shortcut createShortcut(String nameI,
                                                String destinationAddressI,
                                                double costI)
                                         throws AddressException,
                                                SerializeException,
                                                InterruptedIOException,
                                                IOException,
                                                InterruptedException

  Creates a `Shortcut` object.

  Parameters:
    `nameI` - the name of the `Shortcut`.
    `destinationAddressI` - the destination of the `Shortcut`.
    `costI` - the cost of the `Shortcut`.
  Returns:
    the `Shortcut`.
  Throws:
    `AddressException`
    `SerializeException`
    `InterruptedIOException`
    `IOException`
    `InterruptedException`
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    01/23/2002

### createSink

    public final Sink createSink(String nameI)
                          throws AddressException,
                                 SerializeException,
                                 InterruptedIOException,
                                 IOException,
                                 InterruptedException

  Creates a `Sink` for this `Server`.

  Parameters:
    `nameI` - the name of the `Sink`.
  Returns:
    the `Sink`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createRAMSink(String nameI)`
  Author:
    Ian Brown
  Version:
    05/15/2001

### createSource

    public final Source createSource(String nameI)
                              throws AddressException,
                                     SerializeException,
                                     InterruptedIOException,
                                     IOException,
                                     InterruptedException

  Creates a `Source` for this `Server`.

  Parameters:
    `nameI` - the name of the `Source`.
  Returns:
    the `Source`.
  Throws:
    `AddressException` - thrown if there is a problem with the address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O
    `IOException` - thrown if there is a problem with I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `createRAMSource(String nameI)`
  Author:
    Ian Brown
  Version:
    05/15/2001

### getAddress

    public final String getAddress()

  Gets the server address.

  Returns:
    the address of the server.
  Since:
    V2.0
  See Also:
    `setAddress(String)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### isRunning

    public boolean isRunning()

  Is this `Server` running?

  Returns:
    is the `Server` running?
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    05/15/2001

### launchNewServer

    public static final Server launchNewServer(String[] argsI)
                                        throws IllegalArgumentException,
                                               Exception

  Launches a new server based on the command line arguments.

  Parameters:
    `argsI` - the command line arguments.
  Returns:
    the `Server` handle.
  Throws:
    `IllegalArgumentException` - if an illegal argument is found.
    `Exception` - if any other error occurs.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    11/03/2003

### main

    public static final void main(String[] argsI)

  Main DataTurbine `RBNB` method.

  Parameters:
    `argsI` - the command line arguments.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    06/22/2006

### newServerHandle

    public static final Server newServerHandle(String nameI,
                                               String addressI)
                                        throws AddressException,
                                               SerializeException,
                                               EOFException,
                                               InterruptedIOException,
                                               IOException,
                                               InterruptedException

  Creates a new `Server` handle to an RBNB server.

  Parameters:
    `nameI` - the server's name.

    This field may be omitted if the server is an external one. If so, the getName() method returns the actual name of the `Server` once a `Client` connection has been established.

    `addressI` - the server's address.
  Returns:
    the `Server` handle.
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error during I/O.
    `InterruptedException` - thrown if the operation is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    10/01/2001

### setAddress

    public final void setAddress(String addressI)
                          throws AddressException

  Sets the server address.

  Parameters:
    `addressI` - the address of the server.
  Throws:
    `AddressException` - thrown if the address is not legal.
  Since:
    V2.0
  See Also:
    `getAddress()`
  Author:
    Ian Brown
  Version:
    12/21/2001

### start

    public void start()
               throws AddressException,
                      SerializeException,
                      InterruptedIOException,
                      IOException,
                      InterruptedException

  Starts the RBNB server as a thread in the current process.

  Throws:
    `AddressException` - thrown if there is a problem completing the connection due addressing problems.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if the I/O is interrupted.
    `IOException` - thrown if there is a problem during I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `stop()`
  Author:
    Ian Brown
  Version:
    01/30/2002

### start

    public void start(String[] argsI)
               throws AddressException,
                      SerializeException,
                      InterruptedIOException,
                      IOException,
                      InterruptedException

  Starts the RBNB server as a thread in the current process.

  Parameters:
    `argsI` - the command line arguments that should be processed by the running server.
  Throws:
    `AddressException` - thrown if there is a problem completing the connection due addressing problems.
    `SerializeException` - thrown if there is a problem with the serialization.
    `InterruptedIOException` - thrown if the I/O is interrupted.
    `IOException` - thrown if there is a problem during I/O.
    `InterruptedException` - thrown if this operation is interrupted.
  Since:
    V2.0
  See Also:
    `stop()`
  Author:
    Ian Brown
  Version:
    01/30/2002

### stop

    public void stop()
              throws AddressException,
                     SerializeException,
                     EOFException,
                     IOException,
                     InterruptedException

  Stops the RBNB server.

  All children of this `Server` object are stopped and removed as children before the RBNB server itself is stopped.

  If the server is not running locally, a control connection is made to it and is used to stop the server.

  Throws:
    `AddressException` - thrown if there is an addressing problem.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `IOException` - thrown if there is an error during I/O.
    `InterruptedException` - thrown if the start is interrupted.
  Since:
    V2.0
  See Also:
    `start()`
  Author:
    Ian Brown
  Version:
    05/11/2004

### clone

    public Object clone()

  Clones this object.

  This same abstract declaration is also included in RmapInterface.java, but for some unknown reason J# gives a compiler error if it is not also included here.

  Specified by:
    `clone` in interface `RmapInterface`
  Returns:
    the clone.
  Since:
    V2.5
  See Also:
    `Cloneable`
  Author:
    John Wilson
  Version:
    09/29/2004