A set of supported protocol schemes . More...
Schemes are identified by lowercase names.
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
SchemeRegistry () | |
Creates a new, empty scheme registry. | |
synchronized final Scheme | getScheme (String name) |
Obtains a scheme by name. More... | |
synchronized final Scheme | getScheme (HttpHost host) |
Obtains the scheme for a host. More... | |
synchronized final Scheme | get (String name) |
Obtains a scheme by name, if registered. More... | |
synchronized final Scheme | register (Scheme sch) |
Registers a scheme. More... | |
synchronized final Scheme | unregister (String name) |
Unregisters a scheme. More... | |
synchronized final List< String > | getSchemeNames () |
Obtains the names of the registered schemes in their default order. More... | |
synchronized void | setItems (final Map< String, Scheme > map) |
Populates the internal collection of registered protocol schemes with the content of the map passed as a parameter. More... | |
synchronized final Scheme getScheme | ( | String | name | ) |
name | the name of the scheme to look up (in lowercase) |
null
IllegalStateException | if the scheme with the given name is not registered |
Convenience method for getScheme(host.getSchemeName())
host | the host for which to obtain the scheme |
null
IllegalStateException | if a scheme with the respective name is not registered |
synchronized final Scheme get | ( | String | name | ) |
name | the name of the scheme to look up (in lowercase) |
null
if there is none by this name The scheme can later be retrieved by its name using (String) getScheme or get .
sch | the scheme to register |
null
if none was registered synchronized final Scheme unregister | ( | String | name | ) |
name | the name of the scheme to unregister (in lowercase) |
null
if there was none synchronized final List<String> getSchemeNames | ( | ) |
synchronized void setItems | ( | final Map< String, Scheme > | map | ) |
map | protocol schemes |