xmlBlaster 2.2.0 API

org.xmlBlaster.engine.admin.extern.snmp
Class ConnectionTableSubject

java.lang.Object
  extended by org.xmlBlaster.engine.admin.extern.snmp.ConnectionTableSubject
All Implemented Interfaces:
Subject

public class ConnectionTableSubject
extends java.lang.Object
implements Subject

ConnectionTableSubject holds onto connection entries. The ConnectionTableSubject also allows Observers to add and remove themselves. In order to add or remove a connection entry notifyObservers() is called.

Version:
@VERSION@
Author:
Udo Thalmann

Field Summary
 ConnectionEntryImplPeer connectionEntryImplPeer
           
static int INSERT
           
 java.lang.Integer nodeIndex
           
 NodeTableObserver nodeTableObserver
           
 java.util.ArrayList observers
           
 int opCode
           
static int REMOVE
           
 
Constructor Summary
ConnectionTableSubject(NodeTableObserver nodeTableObserver)
          Holds a reference to nodeTableObserver.
 
Method Summary
 void addEntry(java.lang.String nodeName, ConnectionEntryImplPeer connectionEntryImplPeer)
          Calls notifyObservers in order to add a new connection entry to connection table.
 void addObserver(Observer o)
          Adds an observer to observer list.
private  void notifyObservers()
          Calls update method for all observers in observer list.
 void removeEntry(java.lang.String nodeName, ConnectionEntryImplPeer connectionEntryImplPeer)
          Calls notifyObservers in order to remove a connection entry from connection table.
 void removeObserver(Observer o)
          Removes an observer from observer list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionEntryImplPeer

public ConnectionEntryImplPeer connectionEntryImplPeer

nodeTableObserver

public NodeTableObserver nodeTableObserver

observers

public java.util.ArrayList observers

nodeIndex

public java.lang.Integer nodeIndex

opCode

public int opCode

INSERT

public static final int INSERT
See Also:
Constant Field Values

REMOVE

public static final int REMOVE
See Also:
Constant Field Values
Constructor Detail

ConnectionTableSubject

public ConnectionTableSubject(NodeTableObserver nodeTableObserver)
Holds a reference to nodeTableObserver.

Parameters:
NodeTableObserver - provides access to nodeIndex.
Method Detail

addEntry

public void addEntry(java.lang.String nodeName,
                     ConnectionEntryImplPeer connectionEntryImplPeer)
Calls notifyObservers in order to add a new connection entry to connection table.

Parameters:
NodeName - node to wich connection entry belongs.
ConnectionEntryImplPeer - connection entry to be added.

removeEntry

public void removeEntry(java.lang.String nodeName,
                        ConnectionEntryImplPeer connectionEntryImplPeer)
Calls notifyObservers in order to remove a connection entry from connection table.

Parameters:
NodeName - node to wich connection entry belongs.
ConnectionEntryImplPeer - connection entry to be removed.

addObserver

public void addObserver(Observer o)
Adds an observer to observer list.

Specified by:
addObserver in interface Subject
Parameters:
Observer - implements observer update method.

removeObserver

public void removeObserver(Observer o)
Removes an observer from observer list.

Specified by:
removeObserver in interface Subject
Parameters:
Observer - implements observer update method.

notifyObservers

private void notifyObservers()
Calls update method for all observers in observer list.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.