001    /*
002      GRANITE DATA SERVICES
003      Copyright (C) 2011 GRANITE DATA SERVICES S.A.S.
004    
005      This file is part of Granite Data Services.
006    
007      Granite Data Services is free software; you can redistribute it and/or modify
008      it under the terms of the GNU Library General Public License as published by
009      the Free Software Foundation; either version 2 of the License, or (at your
010      option) any later version.
011    
012      Granite Data Services is distributed in the hope that it will be useful, but
013      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
014      FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
015      for more details.
016    
017      You should have received a copy of the GNU Library General Public License
018      along with this library; if not, see <http://www.gnu.org/licenses/>.
019    */
020    
021    package org.granite.config;
022    
023    import java.io.IOException;
024    
025    import org.granite.jmx.MBean;
026    import org.granite.jmx.MBeanAttribute;
027    import org.granite.jmx.MBeanOperation;
028    import org.granite.jmx.MBeanOperation.Impact;
029    
030    /**
031     * @author Franck WOLFF
032     */
033    @MBean(description="MBean used for GraniteConfig operations")
034    public interface ServletGraniteConfigMBean {
035    
036            ///////////////////////////////////////////////////////////////////////////
037            // Attributes.
038            
039        @MBeanAttribute(description="Does this config use auto scanning?")
040            public boolean getScan();
041            
042        @MBeanAttribute(description="The custom (webapp specific) granite-config.xml file location")
043        public String getCustomConfigPath();
044            
045        @MBeanAttribute(description="The AMF3Serializer class")
046        public String getAmf3SerializerClass();
047            
048        @MBeanAttribute(description="The AMF3Deserializer class")
049        public String getAmf3DeserializerClass();
050        
051        @MBeanAttribute(description="The AMF3MessageInterceptor class")
052        public String getAmf3MessageInterceptorClass();
053        
054        @MBeanAttribute(description="The MethodMatcher class")
055        public String getMethodMatcherClass();
056    
057        @MBeanAttribute(description="The ServiceInvocationListener class")
058        public String getServiceInvocationListenerClass();
059        
060        @MBeanAttribute(description="The ClassGetter class")
061        public String getClassGetterClass();
062        
063        @MBeanAttribute(description="The SecurityService class")
064        public String getSecurityServiceClass();
065        
066        @MBeanAttribute(description="The MessageSelector class")
067        public String getMessageSelectorClass();
068        
069            ///////////////////////////////////////////////////////////////////////////
070            // Operations.
071        
072        @MBeanOperation(
073            description="Shows the custom (webapp specific) granite-config.xml file content",
074            impact=Impact.INFO
075        )
076            public String showCustomConfig() throws IOException;
077    
078        @MBeanOperation(
079            description="Shows the standard (built-in) granite-config.xml file content",
080            impact=Impact.INFO
081        )
082            public String showStandardConfig() throws IOException;
083    
084        @MBeanOperation(
085            description="Shows the list of all configured type converters",
086            impact=Impact.INFO
087        )
088            public String showConverters();
089    
090        @MBeanOperation(
091            description="Shows the list of all configured instantiators",
092            impact=Impact.INFO
093        )
094            public String showInstantiators();
095        
096        @MBeanOperation(
097            description="Shows the list of all configured exception converters",
098            impact=Impact.INFO
099        )
100        public String showExceptionConverters();
101        
102        @MBeanOperation(
103            description="Shows scanned externalizers",
104            impact=Impact.INFO
105        )
106        public String showScannedExternalizers();
107    
108        @MBeanOperation(
109            description="Shows which externalizer is used for a given serialized object (dynamic)",
110            impact=Impact.INFO
111        )
112        public String showExternalizersByType();
113    
114        @MBeanOperation(
115            description="Shows which externalizer is used for a given serialized instance (configured)",
116            impact=Impact.INFO
117        )
118        public String showExternalizersByInstanceOf();
119    
120        @MBeanOperation(
121            description="Shows which externalizer is used for a given serialized annotated object (configured)",
122            impact=Impact.INFO
123        )
124        public String showExternalizersByAnnotatedWith();
125    
126        @MBeanOperation(
127            description="Shows which Java descriptor is used for a given serialized object (dynamic)",
128            impact=Impact.INFO
129        )
130        public String showJavaDescriptorsByType();
131    
132        @MBeanOperation(
133            description="Shows which Java descriptor is used for a given serialized instance (configured)",
134            impact=Impact.INFO
135        )
136        public String showJavaDescriptorsByInstanceOf();
137    
138        @MBeanOperation(
139            description="Shows which ActionScript3 descriptor is used for a given serialized object (dynamic)",
140            impact=Impact.INFO
141        )
142        public String showAs3DescriptorsByType();
143    
144        @MBeanOperation(
145            description="Shows which ActionScript3 descriptor is used for a given serialized instance (configured)",
146            impact=Impact.INFO
147        )
148        public String showAs3DescriptorsByInstanceOf();
149    
150        @MBeanOperation(
151            description="Shows enabled Tide components (configured)",
152            impact=Impact.INFO
153        )
154        public String showEnabledTideComponentsByName();
155    
156        @MBeanOperation(
157            description="Shows disabled Tide components (configured)",
158            impact=Impact.INFO
159        )
160        public String showDisabledTideComponentsByName();
161    
162        @MBeanOperation(
163            description="Shows Tide component matchers (configured)",
164            impact=Impact.INFO
165        )
166        public String showTideComponentMatchers();
167        
168            @MBeanOperation(
169            description="Reload the granite-config.xml file",
170            impact=Impact.ACTION
171        )
172        public void reload();
173    }