sdt.mediator
Class Session

java.lang.Object
  extended by sdt.mediator.Session

public class Session
extends java.lang.Object

represents a session.


Method Summary
 Bubble addBubble(java.net.URI statemachine, Media m)
           
 Trigger addNotifyOnlyTrigger(Expr te, IHandler h)
          Adds a trigger of a Notify-Only type.
 Trigger addNotifyWaitTrigger(Expr te, IHandler h)
          Adds a trigger of a Notify-Wait type.
 Trigger addTrigger(Expr te, IHandler h, TriggerKind k)
          Add a trigger
 void blockTriggers()
          blocks all triggers for this session
 void drop()
          stops session.
 boolean eq(Session o)
          equality function
 boolean equals(java.lang.Object o)
           
 java.util.Set<Bubble> getBubbles()
           
 java.util.Set<Trigger> getTriggers()
           
 SessionURI getURI()
           
 int hashCode()
           
 Expr mkEnterState(IState state, BubbleVar bv, PartyInBubbleVar pv)
           
 Expr mkEvent(IEvent a, BubbleVar bv, PartyInBubbleVar pv)
           
 Expr mkInState(IState state, BubbleVar bv, PartyInBubbleVar pv)
           
 Expr mkLeaveState(IState state, BubbleVar bv, PartyInBubbleVar pv)
           
 java.lang.String toString()
           
 void unblockTriggers()
          un-blocks all triggers for this session
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

eq

public boolean eq(Session o)
equality function


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addBubble

public Bubble addBubble(java.net.URI statemachine,
                        Media m)
                 throws SDTException
Throws:
SDTException

addTrigger

public Trigger addTrigger(Expr te,
                          IHandler h,
                          TriggerKind k)
                   throws SDTException
Add a trigger

Parameters:
te - is the trigger condition (see sdt.mediator.predicates for structure)
h - is the handler to be called when the trigger is activated
t - is the type of trigger (notify-only, notify-and-wait)
Returns:
a trigger object
Throws:
SDTException

addNotifyWaitTrigger

public Trigger addNotifyWaitTrigger(Expr te,
                                    IHandler h)
                             throws SDTException
Adds a trigger of a Notify-Wait type.

Throws:
SDTException

addNotifyOnlyTrigger

public Trigger addNotifyOnlyTrigger(Expr te,
                                    IHandler h)
                             throws SDTException
Adds a trigger of a Notify-Only type.

Throws:
SDTException

getBubbles

public java.util.Set<Bubble> getBubbles()
                                 throws SDTException
Throws:
SDTException

getTriggers

public java.util.Set<Trigger> getTriggers()
                                   throws SDTException
Throws:
SDTException

getURI

public SessionURI getURI()

drop

public void drop()
          throws SDTException
stops session. Removes all bubbles and triggers

Throws:
SDTException

blockTriggers

public void blockTriggers()
blocks all triggers for this session


unblockTriggers

public void unblockTriggers()
un-blocks all triggers for this session


mkEnterState

public Expr mkEnterState(IState state,
                         BubbleVar bv,
                         PartyInBubbleVar pv)

mkEvent

public Expr mkEvent(IEvent a,
                    BubbleVar bv,
                    PartyInBubbleVar pv)

mkInState

public Expr mkInState(IState state,
                      BubbleVar bv,
                      PartyInBubbleVar pv)

mkLeaveState

public Expr mkLeaveState(IState state,
                         BubbleVar bv,
                         PartyInBubbleVar pv)