Package org.apache.wicket.devutils.inspector

Examples of org.apache.wicket.devutils.inspector.SessionTotalSizeModel


  protected IModel<String> getDataModel() {
    return new AbstractReadOnlyModel<String>() {
      private static final long serialVersionUID = 1L;

      private IModel<Bytes> size = new SessionSizeModel(Session.get());
      private IModel<Bytes> totalSize = new SessionTotalSizeModel(Session
          .get());

      @Override
      public String getObject() {
        return size.getObject() + " / " + totalSize.getObject();
      }

      @Override
      public void detach() {
        super.detach();
        size.detach();
        totalSize.detach();
      }
    };
  }
View Full Code Here


  protected IModel<String> getDataModel() {
    return new AbstractReadOnlyModel<String>() {
      private static final long serialVersionUID = 1L;

      private IModel<Bytes> size = new SessionSizeModel(Session.get());
      private IModel<Bytes> totalSize = new SessionTotalSizeModel(Session
          .get());

      @Override
      public String getObject() {
        return size.getObject() + " / " + totalSize.getObject();
      }

      @Override
      public void detach() {
        super.detach();
        size.detach();
        totalSize.detach();
      }
    };
  }
View Full Code Here

    return new AbstractReadOnlyModel<String>()
    {
      private static final long serialVersionUID = 1L;

      private final IModel<Bytes> size = new SessionSizeModel(Session.get());
      private final IModel<Bytes> totalSize = new SessionTotalSizeModel(Session.get());

      @Override
      public String getObject()
      {
        Bytes sessionSizeInBytes = size.getObject();
        String sessionSizeAsString = sessionSizeInBytes != null
          ? sessionSizeInBytes.toString() : "unknown";

        Bytes totalSizeInBytes = totalSize.getObject();
        String totalSizeAsString = totalSizeInBytes != null ? totalSizeInBytes.toString()
          : "unknown";

        return sessionSizeAsString + " / " + totalSizeAsString;
      }

      @Override
      public void detach()
      {
        super.detach();
        size.detach();
        totalSize.detach();
      }
    };
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.devutils.inspector.SessionTotalSizeModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.