Map the specified host name and URI, mutating the given mapping data. @param host Virtual host name @param uri URI @param version The version, if any, included in the request to be mapped @param mappingData This structure will contain the result of the mapping operation @throws
(MessageBytes host, MessageBytes uri, String version, MappingData mappingData)
| 686 | * @throws IOException if the buffers are too small to hold the results of the mapping. |
| 687 | */ |
| 688 | public void map(MessageBytes host, MessageBytes uri, String version, MappingData mappingData) throws IOException { |
| 689 | |
| 690 | if (host.isNull()) { |
| 691 | String defaultHostName = this.defaultHostName; |
| 692 | if (defaultHostName == null) { |
| 693 | return; |
| 694 | } |
| 695 | host.setChars(MessageBytes.EMPTY_CHAR_ARRAY, 0, 0); |
| 696 | host.getCharChunk().append(defaultHostName); |
| 697 | } |
| 698 | host.toChars(); |
| 699 | uri.toChars(); |
| 700 | internalMap(host.getCharChunk(), uri.getCharChunk(), version, mappingData); |
| 701 | } |
| 702 | |
| 703 | |
| 704 | /** |