001: package org.apache.geronimo.monitoring;
002:
003: /**
004: * Licensed to the Apache Software Foundation (ASF) under one or more
005: * contributor license agreements. See the NOTICE file distributed with
006: * this work for additional information regarding copyright ownership.
007: * The ASF licenses this file to You under the Apache License, Version 2.0
008: * (the "License"); you may not use this file except in compliance with
009: * the License. You may obtain a copy of the License at
010: *
011: * http://www.apache.org/licenses/LICENSE-2.0
012: *
013: * Unless required by applicable law or agreed to in writing, software
014: * distributed under the License is distributed on an "AS IS" BASIS,
015: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016: * See the License for the specific language governing permissions and
017: * limitations under the License.
018: */
019:
020: import java.util.ArrayList;
021: import java.util.HashMap;
022: import java.util.Set;
023: import java.util.TreeMap;
024:
025: import javax.annotation.security.RolesAllowed;
026: import javax.ejb.Local;
027: import javax.management.ObjectName;
028:
029: /**
030: * Local Interface for MasterRemoteControl. Defines the operations
031: * that are made available to the remote client.
032: */
033: @Local
034: public interface MasterRemoteControlLocal {
035: @RolesAllowed("mejbuser")
036: public HashMap<String, Long> getStats(String s) throws Exception;
037:
038: @RolesAllowed("mejbadmin")
039: public void setAttribute(String s, String ss, Object o)
040: throws Exception;
041:
042: @RolesAllowed("mejbuser")
043: public boolean startSnapshot(Long l);
044:
045: @RolesAllowed("mejbuser")
046: public boolean stopSnapshot();
047:
048: @RolesAllowed("mejbuser")
049: public ArrayList<HashMap<String, HashMap<String, Object>>> fetchSnapshotData(
050: Integer i, Integer ii);
051:
052: @RolesAllowed("mejbuser")
053: public HashMap<String, HashMap<String, Long>> fetchMaxSnapshotData(
054: Integer i);
055:
056: @RolesAllowed("mejbuser")
057: public HashMap<String, HashMap<String, Long>> fetchMinSnapshotData(
058: Integer i);
059:
060: @RolesAllowed("mejbuser")
061: public Long getSnapshotDuration();
062:
063: @RolesAllowed("mejbuser")
064: public Long getSnapshotCount();
065:
066: @RolesAllowed("mejbuser")
067: public void setSnapshotDuration(Long l);
068:
069: @RolesAllowed("mejbuser")
070: public Set<String> getStatisticsProviderMBeanNames();
071:
072: @RolesAllowed("mejbuser")
073: public Set<String> getAllMBeanNames();
074:
075: @RolesAllowed("mejbuser")
076: public HashMap<String, ArrayList<String>> getAllSnapshotStatAttributes();
077:
078: @RolesAllowed("mejbuser")
079: public boolean addMBeanForSnapshot(String s);
080:
081: @RolesAllowed("mejbuser")
082: public boolean removeMBeanForSnapshot(String s);
083:
084: @RolesAllowed("mejbuser")
085: public boolean isSnapshotRunning();
086:
087: @RolesAllowed("mejbuser")
088: public void setUpMEJB(String username, String password);
089:
090: @RolesAllowed("mejbadmin")
091: public Object invoke(ObjectName name, String operationName,
092: Object[] params, String[] signature);
093:
094: @RolesAllowed("mejbuser")
095: public TreeMap<Long, Long> getSpecificStatistics(String mbeanName,
096: String statsName, int numberOfSnapshots,
097: int everyNthSnapshot, boolean showArchive);
098:
099: @RolesAllowed("mejbuser")
100: public Set<String> getTrackedMBeans();
101:
102: @RolesAllowed("mejbuser")
103: public void setSnapshotRetention(int retention);
104:
105: @RolesAllowed("mejbuser")
106: public String getSnapshotRetention();
107: }
|