Class JingleSessionState

  • Direct Known Subclasses:
    JingleSessionStateActive, JingleSessionStateEnded, JingleSessionStatePending, JingleSessionStateUnknown

    public abstract class JingleSessionState
    extends Object
    Implement the Jingle Session state using the State Behavioral pattern. (From the book Design Patterns, AKA GoF.) These classes also employ the Flyweight and Singleton patterns as recommended for the State pattern by GoF. There seems to be three ways to go with the State pattern in Java: interface, abstract class and enums. Most of the accepted models use abstract classes. It wasn't clear to me that any of the three models was superior, so I went with the most common example.