01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /**
18: * @author Rustem V. Rafikov
19: * @version $Revision: 1.3 $
20: */package javax.imageio.spi;
21:
22: import java.util.Locale;
23:
24: import org.apache.harmony.luni.util.NotImplementedException;
25:
26: public abstract class IIOServiceProvider implements RegisterableService {
27:
28: protected String vendorName;
29: protected String version;
30:
31: public IIOServiceProvider(String vendorName, String version) {
32: if (vendorName == null) {
33: throw new NullPointerException("vendor name cannot be NULL");
34: }
35: if (version == null) {
36: throw new NullPointerException(
37: "version name cannot be NULL");
38: }
39: this .vendorName = vendorName;
40: this .version = version;
41: }
42:
43: public IIOServiceProvider() throws NotImplementedException {
44: // TODO: implement
45: throw new NotImplementedException();
46: }
47:
48: public void onRegistration(ServiceRegistry registry,
49: Class<?> category) {
50: // the default impl. does nothing
51: }
52:
53: public void onDeregistration(ServiceRegistry registry,
54: Class<?> category) throws NotImplementedException {
55: // TODO: implement
56: throw new NotImplementedException();
57: }
58:
59: public String getVendorName() {
60: return vendorName;
61: }
62:
63: public String getVersion() {
64: return version;
65: }
66:
67: public abstract String getDescription(Locale locale);
68: }
|