GraphStream Users

Archives de la liste Aide


Re: Looking for clarification on "processMessage" method


Chronologique Discussions 
  • From: Stefan Balev <stefan.balev AT gmail.com>
  • To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, "Mularz, Diane E." <mularz AT mitre.org>
  • Subject: Re: Looking for clarification on "processMessage" method
  • Date: Wed, 23 Apr 2014 09:47:13 +0200

Hello,

Looking at the code of ThreadProxyPipe I think that this method should not be public. In fact it's a helper called from pump and blockingPump.

You don't need to decode the received messages. Typically you register sinks to the pipe and when events are received their methods are called automatically.

class MySink extends SinkAdapter {
    // override the methods you need
}
...

TheadProxyPipe pipe = ...
...
// sink thread
Sink mySink = new MySink();
pipe.addSink(mySink);
while (true) {
    pipe.blockingPump();
}

Hope this helps,

--
Stefan



2014-04-22 19:54 GMT+02:00 Mularz, Diane E. <mularz AT mitre.org>:

There is a method called “processMessage” associated with a ThreadProxyPipe but there is little documentation about its intended use.  I assume that it provides a way to process an event received.  There are two arguments : GraphEvents and Object.  I cannot find any reference to a GraphEvents type even though it is shown as a type associated with a ThreadProxyPipe.  What am I missing?  Could someone shed some light on how this can be used?  Or, how does one actually decode a message received with a graph event to determine course of action?

 

Thanks,

 

Diane Mularz

Systems Software Engineer

Performance Speciality

The MITRE Corporation

Modeling & Simulation Technical Center

7515 Colshire Dr.

McLean, VA 22102

mularz AT mitre.org

GoogleScholarCitation

703.983.5598(work)

703.983.6435(fax)

 

No element should function merely as a vehicle to extricate oneself from the mire of indecision

 

Ring the bells that still can ring

Forget your perfect offering

There is a crack in everything

That’s how the light gets in

-          Leonard Cohen

 





Archives gérées par MHonArc 2.6.16.

Top of page