Class Draw

    • Constructor Detail

      • Draw

        public Draw​(java.lang.String props,
                    boolean no_channel,
                    boolean jmx,
                    boolean use_state,
                    long state_timeout,
                    boolean use_blocking,
                    boolean use_unicasts)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • Draw

        public Draw​(Channel channel)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • Draw

        public Draw​(Channel channel,
                    boolean use_state,
                    long state_timeout)
             throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getGroupName

        public java.lang.String getGroupName()
      • setGroupName

        public void setGroupName​(java.lang.String groupname)
      • main

        public static void main​(java.lang.String[] args)
      • go

        public void go()
                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • viewAccepted

        public void viewAccepted​(View v)
        Description copied from interface: MembershipListener
        Called when a change in membership has occurred. No long running actions or sending of messages should be done in this callback. If some long running action needs to be performed, it should be done in a separate thread.

        Note that on reception of the first view (a new member just joined), the channel will not yet be in the connected state. This only happens when Channel.connect(String) returns.

        Specified by:
        viewAccepted in interface MembershipListener
        Overrides:
        viewAccepted in class ExtendedReceiverAdapter
      • block

        public void block()
        Description copied from interface: MembershipListener
        Called (usually by the FLUSH protocol), as an indication that the member should stop sending messages. Any messages sent after returning from this callback might get blocked by the FLUSH protocol. When the FLUSH protocol is done, and messages can be sent again, the FLUSH protocol will simply unblock all pending messages. If a callback for unblocking is desired, implement ExtendedMembershipListener.unblock(). Note that block() is the equivalent of reception of a BlockEvent in the pull mode.
        Specified by:
        block in interface MembershipListener
        Overrides:
        block in class ExtendedReceiverAdapter
      • getState

        public void getState​(java.io.OutputStream ostream)
        Description copied from interface: ExtendedMessageListener
        Allows an application to write a state through a provided OutputStream. An application is obligated to always close the given OutputStream reference.
        Specified by:
        getState in interface ExtendedMessageListener
        Overrides:
        getState in class ExtendedReceiverAdapter
        Parameters:
        ostream - the OutputStream
        See Also:
        OutputStream.close()
      • setState

        public void setState​(java.io.InputStream istream)
        Description copied from interface: ExtendedMessageListener
        Allows an application to read a state through a provided InputStream. An application is obligated to always close the given InputStream reference.
        Specified by:
        setState in interface ExtendedMessageListener
        Overrides:
        setState in class ExtendedReceiverAdapter
        Parameters:
        istream - the InputStream
        See Also:
        InputStream.close()
      • clearPanel

        public void clearPanel()
      • sendClearPanelMsg

        public void sendClearPanelMsg()
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • stop

        public void stop()