put() public method

public put ( Object o ) : void
o Object
return void
Example #1
0
        /*
         * called by OtpNode to deliver message to this mailbox.
         *
         * About exit and exit2: both cause exception to be raised upon receive().
         * However exit (not 2) causes any link to be removed as well, while exit2
         * leaves any links intact.
         */
        public virtual void deliver(OtpMsg m)
        {
            switch (m.type())
            {
            case OtpMsg.linkTag:
                links.addLink(self, m.getSenderPid());
                break;

            case OtpMsg.unlinkTag:
                links.removeLink(self, m.getSenderPid());
                break;

            case OtpMsg.exitTag:
                links.removeLink(self, m.getSenderPid());
                queue.put(m);
                break;

            case OtpMsg.exit2Tag:
            default:
                queue.put(m);
                break;
            }
        }
Example #2
0
 public override void deliver(Exception e)
 {
     queue.put(e);
 }