The SNIMatcher Class

An instance of the abstract SNIMatcher class runs match operations on an SNIServerName object. Servers can use information from the Server Name Indication (SNI) Extension to decide if a specific SSLSocket or SSLEngine should accept a connection. For example, when multiple virtual or name-based servers are hosted on a single underlying network address, the server application can use SNI information to determine whether this server is the exact server that the client wants to access. Instances of this class can be used by a server to verify the acceptable server names of a particular type, such as host names. The SNIMatcher class is instantiated by using the specified server name type on which match operations are run. To match a SNIServerName, use the matches() method. To return the server name type of the SNIMatcher object, use the getType() method.