Class RestClientSslContextAliasListener
- java.lang.Object
-
- fish.payara.microprofile.jaxrs.client.ssl.RestClientSslContextAliasListener
-
- All Implemented Interfaces:
org.eclipse.microprofile.rest.client.spi.RestClientListener
public class RestClientSslContextAliasListener extends Object implements org.eclipse.microprofile.rest.client.spi.RestClientListener
This class implements RestClientListener to evaluate the alias property and set a custom sslContext for the MicroProfile rest client
-
-
Constructor Summary
Constructors Constructor Description RestClientSslContextAliasListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SSLContext
buildSSlContext(String alias)
This method evaluate the alias on the global keystore and return the corresponding SSLContext based on the alias if not available the SSLContext should be the default that Jersey implementation setprotected org.eclipse.microprofile.config.Config
getConfig()
Method to get the configprotected KeyManager[]
getKeyManagers()
Method used to get KeyManagersprotected KeyStore[]
getKeyStores()
Method used to get KeyStoresvoid
onNewClient(Class<?> serviceInterface, org.eclipse.microprofile.rest.client.RestClientBuilder restClientBuilder)
-
-
-
Method Detail
-
onNewClient
public void onNewClient(Class<?> serviceInterface, org.eclipse.microprofile.rest.client.RestClientBuilder restClientBuilder)
- Specified by:
onNewClient
in interfaceorg.eclipse.microprofile.rest.client.spi.RestClientListener
-
buildSSlContext
protected SSLContext buildSSlContext(String alias)
This method evaluate the alias on the global keystore and return the corresponding SSLContext based on the alias if not available the SSLContext should be the default that Jersey implementation set- Parameters:
alias
- name of the certificate- Returns:
- the SSLContext with the corresponding certificate and alias name
-
getConfig
protected org.eclipse.microprofile.config.Config getConfig()
Method to get the config- Returns:
- Config from MicroProfile
-
getKeyManagers
protected KeyManager[] getKeyManagers() throws Exception
Method used to get KeyManagers- Returns:
- an array of KeyManager
- Throws:
Exception
-
getKeyStores
protected KeyStore[] getKeyStores() throws IOException
Method used to get KeyStores- Returns:
- an array of KeyStore
- Throws:
IOException
-
-