On Wed, May 29, 2013 at 11:58 PM, Martin Grigorov <[email protected]>wrote:
> I've pushed my initial suggestion. > We you think that we have to rename the methods or add onBound() then I'll > do it. > If you think ... > > > On Wed, May 29, 2013 at 11:42 PM, Martin Grigorov <[email protected]>wrote: > >> >> >> >> On Wed, May 29, 2013 at 11:38 PM, Sven Meier <[email protected]> wrote: >> >>> Perhaps the names of these methods could be aligned? >>> >>> onBound()/onUnbound() >>> onCreated()/onDestroyed() >>> >> >> The problem is that we have : create, bind and unbound. >> At the moment org.apache.wicket.Application#fetchCreateAndSetSession() >> triggers org.apache.wicket.ISessionListener#onCreated(). >> >> Maybe we should *add* #onBound() too ? >> >> >>> >>> Regards >>> Sven >>> >>> >>> On 05/29/2013 10:29 PM, Martin Grigorov wrote: >>> >>>> Hi, >>>> >>>> Do you think the following improvement should be made for Wicket 7: >>>> >>>> diff --git i/wicket-core/src/main/java/**org/apache/wicket/Application. >>>> **java >>>> w/wicket-core/src/main/java/**org/apache/wicket/Application.**java >>>> index 98a7145..bb39537 100644 >>>> --- i/wicket-core/src/main/java/**org/apache/wicket/Application.**java >>>> +++ w/wicket-core/src/main/java/**org/apache/wicket/Application.**java >>>> @@ -478,6 +478,8 @@ public abstract class Application implements >>>> UnboundListener, IEventSink >>>> public void sessionUnbound(final String sessionId) >>>> { >>>> internalGetPageManager().**sessionExpired(sessionId); >>>> + >>>> + getSessionListeners().**onUnbound(sessionId); >>>> } >>>> >>>> >>>> diff --git >>>> i/wicket-core/src/main/java/**org/apache/wicket/**ISessionListener.java >>>> w/wicket-core/src/main/java/**org/apache/wicket/**ISessionListener.java >>>> index 73afbbf..b731f52 100644 >>>> --- i/wicket-core/src/main/java/**org/apache/wicket/** >>>> ISessionListener.java >>>> +++ w/wicket-core/src/main/java/**org/apache/wicket/** >>>> ISessionListener.java >>>> @@ -29,4 +29,12 @@ public interface ISessionListener >>>> * @param session >>>> */ >>>> void onCreated(Session session); >>>> + >>>> + /** >>>> + * Informs the listener that session with specific id has been >>>> unbound. >>>> + * >>>> + * @param sessionId >>>> + * the id of the unbound session >>>> + */ >>>> + void onUnbound(String sessionId); >>>> } >>>> >>>> It is a minor improvement to make ISessionListener more consistent with >>>> IApplicationListener - one method for create and another for destroy. >>>> >>>> >>> >> >
