[
https://issues.apache.org/jira/browse/GOSSIP-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973939#comment-15973939
]
ASF GitHub Bot commented on GOSSIP-79:
--------------------------------------
Github user edwardcapriolo commented on a diff in the pull request:
https://github.com/apache/incubator-gossip/pull/47#discussion_r112105254
--- Diff:
gossip-base/src/main/java/org/apache/gossip/protocol/ProtocolManager.java ---
@@ -15,19 +15,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.gossip.manager.impl;
+package org.apache.gossip.protocol;
-import org.apache.gossip.manager.GossipCore;
-import org.apache.gossip.manager.GossipManager;
-import org.apache.gossip.manager.PassiveGossipThread;
-import org.apache.log4j.Logger;
+import org.apache.gossip.model.Base;
-public class OnlyProcessReceivedPassiveGossipThread extends
PassiveGossipThread {
-
- public static final Logger LOGGER =
Logger.getLogger(OnlyProcessReceivedPassiveGossipThread.class);
+import java.io.IOException;
- public OnlyProcessReceivedPassiveGossipThread(GossipManager
gossipManager, GossipCore gossipCore) {
- super(gossipManager, gossipCore);
- }
+/** interface for managing message marshaling. */
+public interface ProtocolManager {
+ /** serialize a message
+ * @param message
+ * @return serialized message.
+ * @throws IOException
+ */
+ byte[] write(Base message) throws IOException;
+ Base read(byte[] buf) throws IOException;
--- End diff --
Some guidance might be good here java doc
> create gossip-transport-udp module
> ----------------------------------
>
> Key: GOSSIP-79
> URL: https://issues.apache.org/jira/browse/GOSSIP-79
> Project: Gossip
> Issue Type: Improvement
> Reporter: Gary Dusbabek
> Assignee: Gary Dusbabek
>
> Create a transport module that houses the UDP transport.
> This will probably require some refactoring. It may be prudent to create a
> few interfaces that are kept in gossip-core which are then implemented in
> gossip-transport-udp.
> This probably needs to be a modules
> 1 udp-server
> 2 udp-client
> OtherThings:
> GossipManager.build() needs to look at the URI and dynamically load the right
> server
> GossipCore.send() needs to locate the right client for a URI.
> Both of these things probably need a registry. Please dont make it a static
> singleton thing ! :)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)