MicroTAPAS
Class SubscribeRequestServer

java.lang.Object
  |
  +--MicroTAPAS.SubscribeRequestServer
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.io.Serializable

public class SubscribeRequestServer
extends java.lang.Object
implements java.awt.event.ActionListener, java.io.Serializable

Server for individual subscription requests from clients. The server receives event registrations, checks whether or not they shall be reported, and keep registrations to be reported until the report is sent. Reports are sent only when registrations exists, but it is the clien that specifies when or how often the reports shall be sent.

See Also:
Serialized Form

Constructor Summary
SubscribeRequestServer(SubscribeRequest sr, ActorContext ctx, MicroBaseFrame frame)
          Initiate the subscribe server instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Reported timeout from the initiated timer
 boolean cancelSubscribe()
          Cancel this subscription.
 void registerEvent(int et, GAI sc, java.lang.String at)
          Report of an event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscribeRequestServer

public SubscribeRequestServer(SubscribeRequest sr,
                              ActorContext ctx,
                              MicroBaseFrame frame)
Initiate the subscribe server instance.

Parameters:
sr - The specification of the subscribe request.
ctx - The context to be used to specify the sender of the subscribe reports.
frame - Debugging trace window (temporarly)
Method Detail

cancelSubscribe

public boolean cancelSubscribe()
Cancel this subscription. Deallocates and terminates the instance.


registerEvent

public void registerEvent(int et,
                          GAI sc,
                          java.lang.String at)
Report of an event. The event is checked and eventually stored.

Parameters:
et - Event type
sc - Address of the entity the event concerns
at - Application specific information

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Reported timeout from the initiated timer

Specified by:
actionPerformed in interface java.awt.event.ActionListener