• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #157

pending completion
#157

push

github-actions

web-flow
Provide SerializationContext for PayloadConverter and PayloadCodec (#1695)

Issue #1694

497 of 497 new or added lines in 32 files covered. (100.0%)

16942 of 20806 relevant lines covered (81.43%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/temporal-sdk/src/main/java/io/temporal/payload/context/ActivitySerializationContext.java
1
/*
2
 * Copyright (C) 2022 Temporal Technologies, Inc. All Rights Reserved.
3
 *
4
 * Copyright (C) 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
 *
6
 * Modifications copyright (C) 2017 Uber Technologies, Inc.
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this material except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20

21
package io.temporal.payload.context;
22

23
import io.temporal.activity.ActivityInfo;
24
import io.temporal.common.Experimental;
25
import java.util.Objects;
26
import javax.annotation.Nonnull;
27

28
@Experimental
29
public class ActivitySerializationContext implements HasWorkflowSerializationContext {
30
  private final @Nonnull String namespace;
31
  private final @Nonnull String workflowId;
32
  private final @Nonnull String workflowType;
33
  private final @Nonnull String activityType;
34
  private final @Nonnull String activityTaskQueue;
35
  private final boolean local;
36

37
  public ActivitySerializationContext(
38
      @Nonnull String namespace,
39
      @Nonnull String workflowId,
40
      @Nonnull String workflowType,
41
      @Nonnull String activityType,
42
      @Nonnull String activityTaskQueue,
43
      boolean local) {
1✔
44
    this.namespace = Objects.requireNonNull(namespace);
1✔
45
    this.workflowId = Objects.requireNonNull(workflowId);
1✔
46
    this.workflowType = Objects.requireNonNull(workflowType);
1✔
47
    this.activityType = Objects.requireNonNull(activityType);
1✔
48
    this.activityTaskQueue = Objects.requireNonNull(activityTaskQueue);
1✔
49
    this.local = local;
1✔
50
  }
1✔
51

52
  public ActivitySerializationContext(ActivityInfo info) {
53
    this(
1✔
54
        info.getNamespace(),
1✔
55
        info.getWorkflowId(),
1✔
56
        info.getWorkflowType(),
1✔
57
        info.getActivityType(),
1✔
58
        info.getActivityTaskQueue(),
1✔
59
        info.isLocal());
1✔
60
  }
1✔
61

62
  @Override
63
  @Nonnull
64
  public String getNamespace() {
65
    return namespace;
×
66
  }
67

68
  @Override
69
  @Nonnull
70
  public String getWorkflowId() {
71
    return workflowId;
1✔
72
  }
73

74
  @Nonnull
75
  public String getWorkflowType() {
76
    return workflowType;
×
77
  }
78

79
  @Nonnull
80
  public String getActivityType() {
81
    return activityType;
1✔
82
  }
83

84
  @Nonnull
85
  public String getActivityTaskQueue() {
86
    return activityTaskQueue;
×
87
  }
88

89
  public boolean isLocal() {
90
    return local;
×
91
  }
92
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc