225 |
// the *events* which we want to listen |
// the *events* which we want to listen |
226 |
|
|
227 |
array event_types = { |
array event_types = { |
228 |
"seda.sandStorm.api.StormFooSignal1", |
"seda.sandStorm.api.StagesInitializedSignal", |
229 |
"seda.sandStorm.api.StormFooSignal2" |
"ostore.tapestry.impl.TapestryReadyMsg", |
230 |
|
"ostore.tapestry.api.TapestryDetachConfirm" |
231 |
} |
} |
232 |
|
|
233 |
for (From i = 0 To numberOf(event_types)) { |
for (From i = 0 To numberOf(event_types)) { |
237 |
// the *messages* we want receive through Tapestry |
// the *messages* we want receive through Tapestry |
238 |
|
|
239 |
array message_types = { |
array message_types = { |
240 |
"ostore.tapestry.interweave.StormErrorMsg", |
"org.nongnu.storm.p2p.tapestry.StormErrorMsg", |
241 |
"ostore.tapestry.interweave.StormLocateMsg", |
"org.nongnu.storm.p2p.tapestry.StormLocateMsg", |
242 |
"ostore.tapestry.interweave.StormResponseMsg", |
"org.nongnu.storm.p2p.tapestry.StormResponseMsg", |
243 |
"ostore.tapestry.interweave.StormBlockMsg", |
"org.nongnu.storm.p2p.tapestry.StormBlockMsg", |
244 |
"ostore.tapestry.interweave.StormBlockRequestMsg", |
"org.nongnu.storm.p2p.tapestry.StormBlockRequestMsg", |
245 |
"ostore.tapestry.api.TapestryLocateFailure" |
"ostore.tapestry.api.TapestryLocateFailure" |
246 |
} |
} |
247 |
|
|
258 |
|
|
259 |
classifier.subscribe (message_type[i], verifyInbound); |
classifier.subscribe (message_type[i], verifyInbound); |
260 |
} |
} |
261 |
|
|
262 |
|
|
263 |
} |
} |
264 |
|
|
265 |
// handles *all* events which stage is listening |
// handles *all* events which stage is listening |
279 |
|
|
280 |
} else if (item instanceof TapestryReadyMsg) { |
} else if (item instanceof TapestryReadyMsg) { |
281 |
// connected |
// connected |
282 |
|
publishLocalStormPool() |
283 |
} else if (item instanceof TapestryDetachConfirm) { |
} else if (item instanceof TapestryDetachConfirm) { |
284 |
// disconnected |
// disconnected |
285 |
|
unpublishLocalStormPool() |
286 |
} else if (item instanceof TapestryLocateFailure) { |
} else if (item instanceof TapestryLocateFailure) { |
287 |
// Search failed |
// Search failed |
288 |
|
|