synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "indika kumara" <>
Subject Re: Adding a Field to the AlgorithmContext
Date Sat, 20 Dec 2008 07:25:15 GMT
Hi Hiranya

> But I don't think making this change is simple since algorithm
> implementations are developed against an interface. It seems the interface
> expects the AlgorithmContext to be stored somewhere else and passed into the
> algorithm when needed. Moving the algorithm context permanently into the
> algorithm may mean changing this interface and may be even introducing an
> abstract class. WDYT?

Actually , there was no AlgorithmContext in the LB Algorithm API
(first-cut API) and method was 'getNextEndpoint(MessageContext
synapseMessageContext)' and the method 'getNextEndpoint(MessageContext
synapseMessageContext, AlgorithmContext algorithmContext)'  was added
somewhat recently. It possible to go for previous API and remove
AlgorithmContext dependency from API so that only algorithm
implementation will use internally it (no force to use  but best
practice is to use).  Then algorithm interface will not reveal any
thing about 'AlgorithmContext ' concrete class.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message