SSOServerMonConfig.java revision 0f7c5b88fd04e25bea6113dfc783a05e4e2045f8
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna/**
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * The contents of this file are subject to the terms
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * of the Common Development and Distribution License
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * (the License). You may not use this file except in
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * compliance with the License.
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * You can obtain a copy of the License at
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * https://opensso.dev.java.net/public/CDDLv1.0.html or
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * opensso/legal/CDDLv1.0.txt
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * See the License for the specific language governing
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * permission and limitations under the License.
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * When distributing Covered Code, include this CDDL
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * Header Notice in each file and include the License file
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * at opensso/legal/CDDLv1.0.txt.
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * If applicable, add the following below the CDDL Header,
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * with the fields enclosed by brackets [] replaced by
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * your own identifying information:
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * "Portions Copyrighted [year] [name of copyright owner]"
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * $Id: SSOServerMonConfig.java,v 1.2 2009/11/10 01:33:22 bigfatrat Exp $
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna *
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna */
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna/*
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna * Portions Copyrighted 2011-2014 ForgeRock AS
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna */
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Lunapackage com.sun.identity.monitoring;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Lunapublic class SSOServerMonConfig {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final int htmlPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final int snmpPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final int rmiPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final int policyWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final int sessionWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final boolean monitoringEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final boolean monHtmlPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final boolean monRmiPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final boolean monSnmpPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna final String monAuthFilePath;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna private SSOServerMonConfig (SSOServerMonInfoBuilder asib) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna htmlPort = asib.htmlPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna snmpPort = asib.snmpPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna rmiPort = asib.rmiPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monitoringEnabled = asib.monitoringEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monHtmlPortEnabled = asib.monHtmlPortEnabled;
f3540824d43864b53b7eb04a99a3a1e9468ea7c0James Phillpotts monRmiPortEnabled = asib.monRmiPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monSnmpPortEnabled = asib.monSnmpPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monAuthFilePath = asib.monAuthFilePath;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna policyWindow = asib.policyWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna sessionWindow = asib.sessionWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public static class SSOServerMonInfoBuilder {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna int htmlPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna int snmpPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna int rmiPort;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna int policyWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna int sessionWindow;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna boolean monitoringEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna boolean monHtmlPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna boolean monRmiPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna boolean monSnmpPortEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna String monAuthFilePath;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder(boolean monEnabled) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monitoringEnabled = monEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder htmlPort(int htmlPrt) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna htmlPort = htmlPrt;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder snmpPort (int snmpPrt) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna snmpPort = snmpPrt;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder rmiPort (int rmiPrt) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna rmiPort = rmiPrt;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder monHtmlEnabled (boolean monHtmlEnabled) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monHtmlPortEnabled = monHtmlEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder monRmiEnabled (boolean monRmiEnabled) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monRmiPortEnabled = monRmiEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder monSnmpEnabled (boolean monSnmpEnabled) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monSnmpPortEnabled = monSnmpEnabled;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder htmlAuthFile (String authFilePath)
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna monAuthFilePath = authFilePath;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder policyWindowSize (int policyWindowSize) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna policyWindow = policyWindowSize;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonInfoBuilder sessionWindowSize (int sessionWindowSize) {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna sessionWindow = sessionWindowSize;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return this;
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna public SSOServerMonConfig build() {
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna return new SSOServerMonConfig (this);
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna }
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna}
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna
0f7c5b88fd04e25bea6113dfc783a05e4e2045f8David Luna