// Path: src/main/java/com/senacor/wicket/async/christmas/widgets/api/message/IMessageSource.java
// public interface IMessageSource<T> {
// 
//   T getMessage();
// 
//   T getMessageSync();
// 
//   Boolean isLoading();
// 
//   Boolean hasNext();
// 
//   void loadNext();
// }


import org.apache.wicket.model.AbstractReadOnlyModel;
import com.senacor.wicket.async.christmas.widgets.api.message.IMessageSource;
package com.senacor.wicket.async.christmas.widgets.api.model;



/**
 * Model that blocks the Thread and waits for the Result of the loading call.
 * 
 * @author Olaf Siefart, Senacor Technologies AG
 */
public abstract class AbstractBlockingModel<T> extends AbstractReadOnlyModel<T> implements IAsyncModel<T> {

  @Override
  public T getObject() {
    return getMessageSource().getMessageSync();
  }

  @Override
  public Boolean isLoading() {
// Path: src/main/java/com/senacor/wicket/async/christmas/widgets/api/message/IMessageSource.java
// public interface IMessageSource<T> {
// 
//   T getMessage();
// 
//   T getMessageSync();
// 
//   Boolean isLoading();
// 
//   Boolean hasNext();
// 
//   void loadNext();
// }


// Path: src/main/java/com/senacor/wicket/async/christmas/widgets/api/model/AbstractBlockingModel.java
import org.apache.wicket.model.AbstractReadOnlyModel;
import com.senacor.wicket.async.christmas.widgets.api.message.IMessageSource;

package com.senacor.wicket.async.christmas.widgets.api.model;



/**
 * Model that blocks the Thread and waits for the Result of the loading call.
 * 
 * @author Olaf Siefart, Senacor Technologies AG
 */
public abstract class AbstractBlockingModel<T> extends AbstractReadOnlyModel<T> implements IAsyncModel<T> {

  @Override
  public T getObject() {
    return getMessageSource().getMessageSync();
  }

  @Override
  public Boolean isLoading() {
    return getMessageSource().isLoading();