Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2944

MessageFactory: provide in TP

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • 5.5.1, 5.4.12
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Currently, MessageFactory is static and messages are created via MessageFactory.create().
      However, if users create custom messages, then they may need to associate a MessageFactory with a given transport, e.g. for using different marshallers.

      The code (e.g. in TP.handleSingleMessage() would be changed to look like this:

      short type=in.readShort();
      Message msg = null;
      if(this.msg_factory != null)
           msg=msg_factory.create(type)
      if(msg == null)
           msg=MessageFactory.create(type);
      msg.readFrom(in);
      

      If a message factory is defined in this transpport, we'll use it. Otherwise, the static message factory is used as fallback.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: