Search in sources :

Example 1 with ClientConnection

use of net.nemerosa.ontrack.extension.support.client.ClientConnection in project ontrack by nemerosa.

the class JIRASessionFactoryImpl method create.

@Override
public JIRASession create(JIRAConfiguration configuration) {
    // Creates a HTTP JSON client
    JsonClient jsonClient = clientFactory.getJsonClient(new ClientConnection(configuration.getUrl(), configuration.getUser(), configuration.getPassword()));
    // Creates the client
    JIRAClient client = new JIRAClientImpl(jsonClient);
    // Creates the session
    return new JIRASession() {

        @Override
        public JIRAClient getClient() {
            return client;
        }

        @Override
        public void close() {
            client.close();
        }
    };
}
Also used : JIRAClient(net.nemerosa.ontrack.extension.jira.client.JIRAClient) JsonClient(net.nemerosa.ontrack.client.JsonClient) ClientConnection(net.nemerosa.ontrack.extension.support.client.ClientConnection) JIRAClientImpl(net.nemerosa.ontrack.extension.jira.client.JIRAClientImpl)

Aggregations

JsonClient (net.nemerosa.ontrack.client.JsonClient)1 JIRAClient (net.nemerosa.ontrack.extension.jira.client.JIRAClient)1 JIRAClientImpl (net.nemerosa.ontrack.extension.jira.client.JIRAClientImpl)1 ClientConnection (net.nemerosa.ontrack.extension.support.client.ClientConnection)1