package com.atlassian.stash.internal.project;

/**
 * Exposes project properties to jmx.  Currently only exposes the total number of projects known to stash.
 * @since 3.8
 */
public class ProjectMXBeanAdapter implements ProjectMXBean {

    private final InternalProjectService delegate;

    public ProjectMXBeanAdapter(InternalProjectService delegate) {
        this.delegate = delegate;
    }

    /**
     * @return the number of projects currently configured in stash
     */
    @Override
    public long getCount() {
        return delegate.getCount();
    }
}
