Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## network
Class ManagementServer

    java.lang.Object
      java.lang.Thread
          network.ManagementServer

All Implemented Interfaces:
  java.io.Closeable, java.lang.Runnable

    public class ManagementServer

extends java.lang.Thread
implements java.io.Closeable

This class is responsible for listenning to other hosts requests and responding to them.

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Thread
`java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

Field Summary

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`ManagementServer()` Default constructor starts listening on multicast socket in separate thread.

Method Summary
`void` | `close()` Leaves multicast group and closes sockets.
`int` | `getRepoUsed()` Returns size of used portion of repository in MB.
`void` | `run()`
`void` | `serveMessage(java.net.DatagramPacket packet)` Performs all necessary operations after receiving a multicast message.

Methods inherited from class java.lang.Thread
`activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

Constructor Detail

### ManagementServer

    public ManagementServer()
                     throws java.io.IOException

  Default constructor starts listening on multicast socket in separate thread.

  Throws:
    `java.io.IOException` - if problem opening management multicast socket

Method Detail

### close

    public void close()

  Leaves multicast group and closes sockets. Prepares this class for shutdown.

  Specified by:
    `close` in interface `java.io.Closeable`

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`
  Overrides:
    `run` in class `java.lang.Thread`

### serveMessage

    public void serveMessage(java.net.DatagramPacket packet)

  Performs all necessary operations after receiving a multicast message.

  Parameters:
    `packet` - datagram packet storing received message

### getRepoUsed

    public int getRepoUsed()

  Returns size of used portion of repository in MB.

  Returns:
    used repository in MB

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD