sample.context.actor.ActorSession Java Examples

The following examples show how to use sample.context.actor.ActorSession. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MicroWebConfig.java    From sample-boot-micro with MIT License 5 votes vote down vote up
/**
 * Ribbon 経由で Eureka がサポートしているサービスを実行するための RestTemplate。
 * <p>リクエスト時に利用者情報を紐づけています。
 */
@Bean
@LoadBalanced
RestTemplate restTemplate(ActorSession session) {
    RestTemplate tmpl = new RestTemplate();
    tmpl.setInterceptors(new ArrayList<>(Arrays.asList(
        new RestActorSessionInterceptor(session)
    )));
    return tmpl;
}
 
Example #2
Source File: MicroAppConfig.java    From sample-boot-micro with MIT License 4 votes vote down vote up
/**
 * リクエストに利用者情報が設定されていた時はそのままスレッドローカルへ紐づけます。
 * <p>同期Servletでのみ適切に動きます。
 */
@Bean
public RestActorSessionBindFilter restActorSessionBindFilter(ActorSession session) {
    return new RestActorSessionBindFilter(session);
}
 
Example #3
Source File: MockDomainHelper.java    From sample-boot-micro with MIT License 4 votes vote down vote up
public MockDomainHelper(final Clock mockClock) {
    setActorSession(new ActorSession());
    setTime(new Timestamper(mockClock));
    setSettingHandler(new AppSettingHandler(settingMap));
}
 
Example #4
Source File: MicroAssetConfig.java    From sample-boot-micro with MIT License 4 votes vote down vote up
/**
 * リクエストに利用者情報が設定されていた時はそのままスレッドローカルへ紐づけます。
 * <p>同期Servletでのみ適切に動きます。
 */
@Bean
public RestActorSessionBindFilter restActorSessionBindFilter(ActorSession session) {
    return new RestActorSessionBindFilter(session);
}
 
Example #5
Source File: MockDomainHelper.java    From sample-boot-micro with MIT License 4 votes vote down vote up
public MockDomainHelper(final Clock mockClock) {
    setActorSession(new ActorSession());
    setTime(new Timestamper(mockClock));
    setSettingHandler(new AppSettingHandler(settingMap));
}
 
Example #6
Source File: RestErrorAdvice.java    From sample-boot-micro with MIT License 4 votes vote down vote up
public RestErrorAdvice(MessageSource msg, ActorSession session) {
    this.msg = msg;
    this.session = session;
}
 
Example #7
Source File: RestActorSessionBindFilter.java    From sample-boot-micro with MIT License 4 votes vote down vote up
public RestActorSessionBindFilter(ActorSession session) {
    this.session = session;
}
 
Example #8
Source File: ApplicationConfig.java    From sample-boot-micro with MIT License 4 votes vote down vote up
@Bean
ActorSession actorSession() {
    return new ActorSession();
}
 
Example #9
Source File: MockDomainHelper.java    From sample-boot-micro with MIT License 4 votes vote down vote up
public MockDomainHelper(final Clock mockClock) {
    setActorSession(new ActorSession());
    setTime(new Timestamper(mockClock));
    setSettingHandler(new AppSettingHandler(settingMap));
}
 
Example #10
Source File: RestErrorAdvice.java    From sample-boot-hibernate with MIT License 4 votes vote down vote up
public RestErrorAdvice(MessageSource msg, ActorSession session) {
    this.msg = msg;
    this.session = session;
}
 
Example #11
Source File: ApplicationConfig.java    From sample-boot-hibernate with MIT License 4 votes vote down vote up
@Bean
ActorSession actorSession() {
    return new ActorSession();
}
 
Example #12
Source File: MockDomainHelper.java    From sample-boot-hibernate with MIT License 4 votes vote down vote up
public MockDomainHelper(final Clock mockClock) {
    setActorSession(new ActorSession());
    setTime(new Timestamper(mockClock));
    setSettingHandler(new AppSettingHandler(settingMap));
}
 
Example #13
Source File: MockDomainHelper.java    From ddd-java with MIT License 4 votes vote down vote up
public MockDomainHelper() {
    super(new ActorSession(), new Timestamper("20141118"), new IdGenerator());
}