org.wegra.mon.mem.remote
Class MmServer

java.lang.Object
  extended byorg.wegra.mon.mem.MemoryMonitor
      extended byorg.wegra.mon.mem.remote.MmServer
All Implemented Interfaces:
Monitor, Subscriber

public final class MmServer
extends MemoryMonitor

MemoryMonitor server module for remote monitoring.
Creates instance with appropriate monitor and port number, then you can do monitoring from remote.
Client-side, you can connect using MmClient object.

If you specify instance of MmClient to Constructor's monitor argument, MmServer will act as gateway. It means you can config the topology like this:
[realServer:MmServer] -- [proxyServer:MmServer] -- [remoteClient:MmClient]

Author:
wegra (Bok-Youn Lee)

Field Summary
 
Fields inherited from class org.wegra.mon.mem.MemoryMonitor
fActiveSubscribers, fMonitor, fWaitingSubscribers
 
Constructor Summary
MmServer(int port)
          Creates remote server with specified port number, and DefaultMemoryMonitor.
MmServer(MemoryMonitor monitor, int port)
          Creates remote server with specified port number, and monitor.
 
Method Summary
protected  void hostStoppedPost()
          This method will be executed after hostStopped() method.
static java.awt.Frame showAsFrame(java.lang.String title, boolean standalone)
          Shows MmServer within a example frame.
 
Methods inherited from class org.wegra.mon.mem.MemoryMonitor
getActiveSubscribers, getDefault, getHost, getMaxMemory, getMonitoringRate, getPeakCharge, getSubscribers, getWaitingSubscribers, hostStopped, hostStoppedPre, invokeGc, isHost, messageDelivered, messageDeliveredPost, messageDeliveredPre, register, reset, resultReceived, resultReceivedPost, resultReceivedPre, resumeSubscribing, sendMessage, setMonitoringRate, start, stop, unregister, waitSubscribing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MmServer

public MmServer(int port)
         throws java.io.IOException
Creates remote server with specified port number, and DefaultMemoryMonitor. Remember MmServer creates one push connection internally, and it's port number will be port + 1.

Parameters:
port -

MmServer

public MmServer(MemoryMonitor monitor,
                int port)
         throws java.io.IOException
Creates remote server with specified port number, and monitor. Remember MmServer creates one push connection internally, and it's port number will be port + 1.

Parameters:
monitor -
port -
Method Detail

hostStoppedPost

protected void hostStoppedPost()
Description copied from class: MemoryMonitor
This method will be executed after hostStopped() method. You can override this method if you have any works to do after propagating each host stopped message.

Overrides:
hostStoppedPost in class MemoryMonitor

showAsFrame

public static java.awt.Frame showAsFrame(java.lang.String title,
                                         boolean standalone)
Shows MmServer within a example frame.

Parameters:
title - title of frame.
standalone - running mode (standalone or plug-in).