Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  // ========================================================================
  // Copyright (c) 2009-2009 Mort Bay Consulting Pty. Ltd.
  // ------------------------------------------------------------------------
  // All rights reserved. This program and the accompanying materials
  // are made available under the terms of the Eclipse Public License v1.0
  // and Apache License v2.0 which accompanies this distribution.
  // The Eclipse Public License is available at 
  // http://www.eclipse.org/legal/epl-v10.html
  // The Apache License v2.0 is available at
 // http://www.opensource.org/licenses/apache2.0.php
 // You may elect to redistribute this code under either of these licenses. 
 // ========================================================================
 
 package org.mortbay.jetty.jmx.ws.domain.jaxb;
 
 import java.util.Map;
 
 
 
 
 /* ------------------------------------------------------------ */
 
 @XmlRootElement(name = "Node")
 public class NodeJaxBean implements Comparable<NodeJaxBean>
 {
     public String name;
     public String jettyVersion;
     public int threadCount;
     public int peakThreadCount;
     public Long heapUsed;
     public Long heapInit;
     public Long heapCommitted;
     public Long heapMax;
     public String jmxServiceURL;
 
     public NodeJaxBean()
     {
     }
 
     private NodeJaxBean(String nameString jettyVersionint threadCountint peakThreadCountLong heapUsedLong initLong committedLong max,
             JMXServiceURL jmxServiceURL)
     {
         this. = name;
         this. = threadCount;
         this. = peakThreadCount;
         this. = jettyVersion;
         this. = init;
         this. = heapUsed;
         this. = committed;
         this. = max;
         this. = jmxServiceURL.toString();
     }
 
     public static class NodeJaxBeanBuilder implements Builder<NodeJaxBean>
     {
         private String name;
         private String jettyVersion;
         private JMXServiceURL jmxServiceURL;
 
         // optional
         private int threadCount = 0;
         private int peakThreadCount = 0;
         private Long heapUsed = 0L;
         private Long init = 0L;
         private Long committed = 0L;
         private Long max = 0L;
 
         public NodeJaxBeanBuilder(String nameString jettyVersionJMXServiceURL jmxServiceURL)
         {
             this. = name;
             this. = jettyVersion;
             this. = jmxServiceURL;
         }
 
         public NodeJaxBeanBuilder memory(Map<StringLongmemory)
         {
              = (Long)memory.get("used");
              = (Long)memory.get("init");
              = (Long)memory.get("committed");
              = (Long)memory.get("max");
             return this;
         }
 
         public NodeJaxBeanBuilder threadCount(int threadCount)
         {
             this. = threadCount;
             return this;
         }
 
         public NodeJaxBeanBuilder peakThreadCount(int peakThreadCount)
         {
             this. = peakThreadCount;
             return this;
         }
        public NodeJaxBean build()
        {
        }
    }
    public String getName()
    {
        return ;
    }
    public String getJettyVersion()
    {
        return ;
    }
    public int getThreadCount()
    {
        return ;
    }
    public int getPeakThreadCount()
    {
        return ;
    }
    public Long getHeapUsed()
    {
        return ;
    }
    public Long getInit()
    {
        return ;
    }
    public Long getCommitted()
    {
        return ;
    }
    public Long getMax()
    {
        return ;
    }
    {
        return JMXServiceURLUtils.getJMXServiceURL();
    }
    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + (( == null)?0:.hashCode());
        result = prime * result + ;
        result = prime * result + ;
        return result;
    }
    @Override
    public boolean equals(Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        NodeJaxBean other = (NodeJaxBean)obj;
        if ( == null)
        {
            if (other.heapCommitted != null)
                return false;
        }
        else if (!.equals(other.heapCommitted))
            return false;
        if ( == null)
        {
            if (other.heapUsed != null)
                return false;
        }
        else if (!.equals(other.heapUsed))
            return false;
        if ( == null)
        {
            if (other.heapInit != null)
                return false;
        }
        else if (!.equals(other.heapInit))
            return false;
        if ( == null)
        {
            if (other.jettyVersion != null)
                return false;
        }
        else if (!.equals(other.jettyVersion))
            return false;
        if ( == null)
        {
            if (other.jmxServiceURL != null)
                return false;
        }
        else if (!.equals(other.jmxServiceURL))
            return false;
        if ( == null)
        {
            if (other.heapMax != null)
                return false;
        }
        else if (!.equals(other.heapMax))
            return false;
        if ( == null)
        {
            if (other.name != null)
                return false;
        }
        else if (!.equals(other.name))
            return false;
        if ( != other.peakThreadCount)
            return false;
        if ( != other.threadCount)
            return false;
        return true;
    }
    @Override
    public String toString()
    {
        StringBuilder builder = new StringBuilder();
        builder.append("NodeJaxBean [name=");
        builder.append();
        builder.append(", jettyVersion=");
        builder.append();
        builder.append(", threadCount=");
        builder.append();
        builder.append(", peakThreadCount=");
        builder.append();
        builder.append(", heapUsed=");
        builder.append();
        builder.append(", init=");
        builder.append();
        builder.append(", committed=");
        builder.append();
        builder.append(", max=");
        builder.append();
        builder.append(", jmxServiceURL=");
        builder.append();
        builder.append("]");
        return builder.toString();
    }
    public int compareTo(NodeJaxBean o)
    {
        return this..compareTo(o.name);
    }
New to GrepCode? Check out our FAQ X