-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathSlackClientModule.java
More file actions
32 lines (25 loc) · 1.04 KB
/
SlackClientModule.java
File metadata and controls
32 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.hubspot.slack.client.guice;
import com.google.inject.AbstractModule;
import com.hubspot.slack.client.SlackClientFactory;
import com.hubspot.slack.client.SlackWebClient;
import com.hubspot.slack.client.http.NioHttpClient;
import com.hubspot.slack.client.http.NioHttpClientFactory;
import com.hubspot.slack.client.request.verifier.SlackRequestVerifierModule;
public class SlackClientModule extends AbstractModule {
@Override
protected void configure() {
bind(NioHttpClientFactory.class).toInstance(NioHttpClientFactory.defaultFactory());
bind(NioHttpClient.Factory.class).toInstance(NioHttpClientFactory.defaultFactory());
bind(SlackClientFactory.class).toInstance(SlackClientFactory.defaultFactory());
bind(SlackWebClient.Factory.class).toInstance(SlackClientFactory.defaultFactory());
install(new SlackRequestVerifierModule());
}
@Override
public boolean equals(Object o) {
return o != null && getClass().equals(o.getClass());
}
@Override
public int hashCode() {
return getClass().hashCode();
}
}