org.eclipse.net4j.util.om.trace

## Class RemoteTraceServer

- java.lang.Object
- - org.eclipse.net4j.util.om.trace.RemoteTraceServer

-     public class RemoteTraceServer
      extends Object

  A server that `agents` can connect to and that passes the received `trace events` to `registered` `listeners`.
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RemoteTraceServer.Event` A trace event being passed by a remote trace `server` to `registered` `listeners`.
    `static interface` | `RemoteTraceServer.Listener` Listens to `trace events` being passed by a remote trace `server`.
    `static class` | `RemoteTraceServer.PrintListener` A `listener` that appends `trace events` to a `print stream`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ANY_PORT`
    `static String` | `DEFAULT_ADDRESS`
    `static int` | `DEFAULT_PORT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteTraceServer()`
    `RemoteTraceServer(int port)`
    `RemoteTraceServer(int port, String address)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(RemoteTraceServer.Listener listener)`
    `protected ServerSocket` | `bind()`
    `Exception` | `close()`
    `protected void` | `fireEvent(RemoteTraceServer.Event event)`
    `protected void` | `handleConnections()`
    `protected void` | `handleSession(Socket socket)`
    `protected void` | `handleTrace(DataInputStream in)`
    `void` | `removeListener(RemoteTraceServer.Listener listener)`
    `void` | `start()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_ADDRESS

          public static final String DEFAULT_ADDRESS

      See Also:
        Constant Field Values

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      See Also:
        Constant Field Values

    - #### ANY_PORT

          public static final int ANY_PORT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RemoteTraceServer

          public RemoteTraceServer()
                            throws IOException

      Throws:
        `IOException`

    - #### RemoteTraceServer

          public RemoteTraceServer(int port)
                            throws IOException

      Throws:
        `IOException`

    - #### RemoteTraceServer

          public RemoteTraceServer(int port,
                                   String address)
                            throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### start

          public void start()

      Since:
        3.0

    - #### addListener

          public void addListener(RemoteTraceServer.Listener listener)

    - #### removeListener

          public void removeListener(RemoteTraceServer.Listener listener)

    - #### close

          public Exception close()

    - #### bind

          protected ServerSocket bind()
                               throws IOException

      Throws:
        `IOException`

    - #### handleConnections

          protected void handleConnections()

    - #### handleSession

          protected void handleSession(Socket socket)

    - #### handleTrace

          protected void handleTrace(DataInputStream in)
                              throws IOException

      Throws:
        `IOException`

    - #### fireEvent

          protected void fireEvent(RemoteTraceServer.Event event)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html