You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ola Berg <ol...@arkitema.se> on 2002/08/08 09:26:02 UTC

Re: [pattern] ThrowableHandler

Stephen says:

>I think I agree. BTW, pattern uses the term Command 
>instead of Closure.

Yes, I think it was Closure I thought of when I said ObjectHandler (ObjectHandler is the term I use).

_BUT_ is Command really a good name for a generic Object handler interface?

There is this other pattern called Command, where a Command object is an encapsulation of a command call of some sort (with parameters and everything), that you use fx when you do undo/redo, or implement command queues. Like the State pattern for state changes.

BTW, I find the term Closure a bit vague.

moreBTW, speaking of states, in my equivalent of [patterns] I have StateEnabled. Each StateEnabled object can spit out an Object holding its state (Object getState()), and also recieve a state object, changing the state (void setState(Object)). 

I use it for automatic configuration (configuring the state objects anytime and setting state on the real objects on well defined times), for log aid (the state objects toString() method can be more verbose than the object\'s toString()), for externalization, and for fun ;-)

There are _many_ candidates for patterns, what criteria do you want to apply when you say +1 or -1?

/O

--------------------
ola.berg@arkitema.se
0733 - 99 99 17

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>