diff --git a/src/main/java/org/eclipse/uprotocol/client/CallOptions.java b/src/main/java/org/eclipse/uprotocol/client/CallOptions.java index c8dd786a..4a4a1ae0 100644 --- a/src/main/java/org/eclipse/uprotocol/client/CallOptions.java +++ b/src/main/java/org/eclipse/uprotocol/client/CallOptions.java @@ -12,7 +12,8 @@ */ package org.eclipse.uprotocol.client; - import org.eclipse.uprotocol.v1.*; + import org.eclipse.uprotocol.v1.UPriority; + import java.util.Objects; import java.util.Optional; diff --git a/src/main/java/org/eclipse/uprotocol/client/Notifier.java b/src/main/java/org/eclipse/uprotocol/client/Notifier.java index 49fcc5c2..1d16b1f8 100644 --- a/src/main/java/org/eclipse/uprotocol/client/Notifier.java +++ b/src/main/java/org/eclipse/uprotocol/client/Notifier.java @@ -12,11 +12,14 @@ */ package org.eclipse.uprotocol.client; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UStatus; +import org.eclipse.uprotocol.v1.UUri; + import java.util.Optional; import org.eclipse.uprotocol.transport.UListener; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; import com.google.protobuf.Message; diff --git a/src/main/java/org/eclipse/uprotocol/client/Publisher.java b/src/main/java/org/eclipse/uprotocol/client/Publisher.java index 4e08e4ab..c6527a66 100644 --- a/src/main/java/org/eclipse/uprotocol/client/Publisher.java +++ b/src/main/java/org/eclipse/uprotocol/client/Publisher.java @@ -12,6 +12,7 @@ */ package org.eclipse.uprotocol.client; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; import org.eclipse.uprotocol.v1.UPayloadFormat; import org.eclipse.uprotocol.v1.UStatus; import org.eclipse.uprotocol.v1.UUri; diff --git a/src/main/java/org/eclipse/uprotocol/client/RequestListener.java b/src/main/java/org/eclipse/uprotocol/client/RequestListener.java index 7ab62633..37cd1c86 100644 --- a/src/main/java/org/eclipse/uprotocol/client/RequestListener.java +++ b/src/main/java/org/eclipse/uprotocol/client/RequestListener.java @@ -15,7 +15,11 @@ import java.util.concurrent.CompletableFuture; import org.eclipse.uprotocol.transport.UListener; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UMessageType; + /** * uService (servers) implement this to receive requests messages from clients.
diff --git a/src/main/java/org/eclipse/uprotocol/client/RpcClient.java b/src/main/java/org/eclipse/uprotocol/client/RpcClient.java index 786ca5a5..636cb241 100644 --- a/src/main/java/org/eclipse/uprotocol/client/RpcClient.java +++ b/src/main/java/org/eclipse/uprotocol/client/RpcClient.java @@ -23,7 +23,13 @@ package org.eclipse.uprotocol.client; import org.eclipse.uprotocol.transport.UListener; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UPayloadFormat; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UStatus; import com.google.protobuf.Message; diff --git a/src/main/java/org/eclipse/uprotocol/client/RpcMapper.java b/src/main/java/org/eclipse/uprotocol/client/RpcMapper.java index b4377459..5da57ec7 100644 --- a/src/main/java/org/eclipse/uprotocol/client/RpcMapper.java +++ b/src/main/java/org/eclipse/uprotocol/client/RpcMapper.java @@ -19,7 +19,8 @@ import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UStatus; +import org.eclipse.uprotocol.v1.UCode; /** * RPC Wrapper is an interface that provides static methods to be able to wrap an RPC request with diff --git a/src/main/java/org/eclipse/uprotocol/client/RpcServer.java b/src/main/java/org/eclipse/uprotocol/client/RpcServer.java index 93f71b68..e8984054 100644 --- a/src/main/java/org/eclipse/uprotocol/client/RpcServer.java +++ b/src/main/java/org/eclipse/uprotocol/client/RpcServer.java @@ -15,7 +15,8 @@ import java.util.Optional; import org.eclipse.uprotocol.uri.factory.UriFactory; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UStatus; +import org.eclipse.uprotocol.v1.UUri; /** * RpcServer is an interface called by uServices to register method listeners for incoming RPC requests diff --git a/src/main/java/org/eclipse/uprotocol/client/UPayload.java b/src/main/java/org/eclipse/uprotocol/client/UPayload.java index e5abd4ff..6cc7a00b 100644 --- a/src/main/java/org/eclipse/uprotocol/client/UPayload.java +++ b/src/main/java/org/eclipse/uprotocol/client/UPayload.java @@ -1,6 +1,6 @@ package org.eclipse.uprotocol.client; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UPayloadFormat; import java.util.Optional; diff --git a/src/main/java/org/eclipse/uprotocol/client/UStatusException.java b/src/main/java/org/eclipse/uprotocol/client/UStatusException.java index 2ad47454..ac786a89 100644 --- a/src/main/java/org/eclipse/uprotocol/client/UStatusException.java +++ b/src/main/java/org/eclipse/uprotocol/client/UStatusException.java @@ -13,7 +13,8 @@ package org.eclipse.uprotocol.client; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UStatus; +import org.eclipse.uprotocol.v1.UCode; /** diff --git a/src/main/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEvent.java b/src/main/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEvent.java index 651332bf..578564bc 100644 --- a/src/main/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEvent.java +++ b/src/main/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEvent.java @@ -12,7 +12,7 @@ */ package org.eclipse.uprotocol.cloudevent.factory; -import org.eclipse.uprotocol.v1.Uoptions; +import org.eclipse.uprotocol.Uoptions; import org.eclipse.uprotocol.uri.serializer.UriSerializer; import org.eclipse.uprotocol.uuid.factory.UuidUtils; import org.eclipse.uprotocol.uuid.serializer.UuidSerializer; @@ -25,7 +25,14 @@ import io.cloudevents.CloudEvent; import io.cloudevents.CloudEventData; import io.cloudevents.core.builder.CloudEventBuilder; -import org.eclipse.uprotocol.v1.*; + +import org.eclipse.uprotocol.v1.UAttributes; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UPayloadFormat; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UUID; import java.net.URI; import java.time.OffsetDateTime; diff --git a/src/main/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidator.java b/src/main/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidator.java index 9d449124..ae6c2a37 100644 --- a/src/main/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidator.java +++ b/src/main/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidator.java @@ -15,7 +15,7 @@ import io.cloudevents.CloudEvent; import org.eclipse.uprotocol.cloudevent.factory.UCloudEvent; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UUri; import org.eclipse.uprotocol.validation.ValidationResult; import org.eclipse.uprotocol.uri.serializer.UriSerializer; import org.eclipse.uprotocol.uri.validator.UriValidator; diff --git a/src/main/java/org/eclipse/uprotocol/transport/UListener.java b/src/main/java/org/eclipse/uprotocol/transport/UListener.java index e00260a5..8681f804 100644 --- a/src/main/java/org/eclipse/uprotocol/transport/UListener.java +++ b/src/main/java/org/eclipse/uprotocol/transport/UListener.java @@ -12,7 +12,7 @@ */ package org.eclipse.uprotocol.transport; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UMessage; /** * For any implementation that defines some kind of callback or function that will be called to handle incoming messages. diff --git a/src/main/java/org/eclipse/uprotocol/transport/UTransport.java b/src/main/java/org/eclipse/uprotocol/transport/UTransport.java index 389dd43c..dc604785 100644 --- a/src/main/java/org/eclipse/uprotocol/transport/UTransport.java +++ b/src/main/java/org/eclipse/uprotocol/transport/UTransport.java @@ -14,7 +14,9 @@ import java.util.Optional; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UStatus; +import org.eclipse.uprotocol.v1.UUri; /** * UTransport is the uP-L1 interface that provides a common API for uE developers to send and receive messages. diff --git a/src/main/java/org/eclipse/uprotocol/client/UMessageBuilder.java b/src/main/java/org/eclipse/uprotocol/transport/builder/UMessageBuilder.java similarity index 96% rename from src/main/java/org/eclipse/uprotocol/client/UMessageBuilder.java rename to src/main/java/org/eclipse/uprotocol/transport/builder/UMessageBuilder.java index d8b5078c..8fc30ea2 100644 --- a/src/main/java/org/eclipse/uprotocol/client/UMessageBuilder.java +++ b/src/main/java/org/eclipse/uprotocol/transport/builder/UMessageBuilder.java @@ -10,10 +10,17 @@ * * SPDX-License-Identifier: Apache-2.0 */ -package org.eclipse.uprotocol.client; +package org.eclipse.uprotocol.transport.builder; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UAttributes; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UPayloadFormat; +import org.eclipse.uprotocol.v1.UUID; import com.google.protobuf.Any; import com.google.protobuf.ByteString; diff --git a/src/main/java/org/eclipse/uprotocol/transport/validate/UAttributesValidator.java b/src/main/java/org/eclipse/uprotocol/transport/validate/UAttributesValidator.java index 636d1300..37ded2d9 100644 --- a/src/main/java/org/eclipse/uprotocol/transport/validate/UAttributesValidator.java +++ b/src/main/java/org/eclipse/uprotocol/transport/validate/UAttributesValidator.java @@ -15,7 +15,11 @@ import org.eclipse.uprotocol.uri.validator.UriValidator; import org.eclipse.uprotocol.uuid.factory.UuidUtils; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UAttributes; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UUID; import org.eclipse.uprotocol.validation.ValidationResult; import java.util.Objects; diff --git a/src/main/java/org/eclipse/uprotocol/uri/factory/UriFactory.java b/src/main/java/org/eclipse/uprotocol/uri/factory/UriFactory.java index 331b9313..fcb666c9 100644 --- a/src/main/java/org/eclipse/uprotocol/uri/factory/UriFactory.java +++ b/src/main/java/org/eclipse/uprotocol/uri/factory/UriFactory.java @@ -1,6 +1,6 @@ package org.eclipse.uprotocol.uri.factory; -import org.eclipse.uprotocol.v1.Uoptions; +import org.eclipse.uprotocol.Uoptions; import org.eclipse.uprotocol.v1.UUri; import com.google.protobuf.DescriptorProtos.ServiceOptions; diff --git a/src/test/java/org/eclipse/uprotocol/client/TestUTransport.java b/src/test/java/org/eclipse/uprotocol/client/TestUTransport.java index 54e579f2..9e371d85 100644 --- a/src/test/java/org/eclipse/uprotocol/client/TestUTransport.java +++ b/src/test/java/org/eclipse/uprotocol/client/TestUTransport.java @@ -13,9 +13,9 @@ package org.eclipse.uprotocol.client; -import org.eclipse.uprotocol.client.UMessageBuilder; import org.eclipse.uprotocol.transport.UListener; import org.eclipse.uprotocol.transport.UTransport; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; import org.eclipse.uprotocol.transport.validate.UAttributesValidator; import org.eclipse.uprotocol.v1.UCode; import org.eclipse.uprotocol.v1.UMessage; diff --git a/src/test/java/org/eclipse/uprotocol/cloudevent/factory/CloudEventFactoryTest.java b/src/test/java/org/eclipse/uprotocol/cloudevent/factory/CloudEventFactoryTest.java index 921c5e02..571558ba 100644 --- a/src/test/java/org/eclipse/uprotocol/cloudevent/factory/CloudEventFactoryTest.java +++ b/src/test/java/org/eclipse/uprotocol/cloudevent/factory/CloudEventFactoryTest.java @@ -17,7 +17,10 @@ import io.cloudevents.core.builder.CloudEventBuilder; import org.eclipse.uprotocol.cloudevent.datamodel.UCloudEventAttributes; import org.eclipse.uprotocol.uri.serializer.UriSerializer; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UUri; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEventTest.java b/src/test/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEventTest.java index cda73d6e..24af1720 100644 --- a/src/test/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEventTest.java +++ b/src/test/java/org/eclipse/uprotocol/cloudevent/factory/UCloudEventTest.java @@ -18,12 +18,19 @@ import io.cloudevents.CloudEventData; import io.cloudevents.core.builder.CloudEventBuilder; -import org.eclipse.uprotocol.client.UMessageBuilder; import org.eclipse.uprotocol.cloudevent.datamodel.UCloudEventAttributes; +import org.eclipse.uprotocol.transport.builder.UMessageBuilder; import org.eclipse.uprotocol.uri.serializer.UriSerializer; import org.eclipse.uprotocol.uuid.factory.UuidFactory; import org.eclipse.uprotocol.uuid.serializer.UuidSerializer; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UUID; +import org.eclipse.uprotocol.v1.UPayloadFormat; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipse/uprotocol/cloudevent/serialize/CloudEventToProtobufSerializerTest.java b/src/test/java/org/eclipse/uprotocol/cloudevent/serialize/CloudEventToProtobufSerializerTest.java index c1f61e18..184a3d09 100644 --- a/src/test/java/org/eclipse/uprotocol/cloudevent/serialize/CloudEventToProtobufSerializerTest.java +++ b/src/test/java/org/eclipse/uprotocol/cloudevent/serialize/CloudEventToProtobufSerializerTest.java @@ -21,7 +21,9 @@ import org.eclipse.uprotocol.cloudevent.factory.CloudEventFactory; import org.eclipse.uprotocol.cloudevent.factory.UCloudEvent; import org.eclipse.uprotocol.uri.serializer.UriSerializer; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UMessageType; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidatorTest.java b/src/test/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidatorTest.java index d2e9c3e4..2cd12f56 100644 --- a/src/test/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidatorTest.java +++ b/src/test/java/org/eclipse/uprotocol/cloudevent/validate/CloudEventValidatorTest.java @@ -22,7 +22,14 @@ import org.eclipse.uprotocol.uri.serializer.UriSerializer; import org.eclipse.uprotocol.uuid.factory.UuidFactory; import org.eclipse.uprotocol.uuid.serializer.UuidSerializer; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UUID; +import org.eclipse.uprotocol.v1.UPayloadFormat; +import org.eclipse.uprotocol.v1.UStatus; import org.eclipse.uprotocol.validation.ValidationResult; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipse/uprotocol/transport/builder/UMessageBuilderTest.java b/src/test/java/org/eclipse/uprotocol/transport/builder/UMessageBuilderTest.java index d95a6862..ac3f209e 100644 --- a/src/test/java/org/eclipse/uprotocol/transport/builder/UMessageBuilderTest.java +++ b/src/test/java/org/eclipse/uprotocol/transport/builder/UMessageBuilderTest.java @@ -12,9 +12,15 @@ */ package org.eclipse.uprotocol.transport.builder; -import org.eclipse.uprotocol.client.UMessageBuilder; -import org.eclipse.uprotocol.client.UPayload; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UCode; +import org.eclipse.uprotocol.v1.UPriority; +import org.eclipse.uprotocol.v1.UUri; +import org.eclipse.uprotocol.v1.UMessage; +import org.eclipse.uprotocol.v1.UMessageType; +import org.eclipse.uprotocol.v1.UUID; +import org.eclipse.uprotocol.v1.UPayloadFormat; +import org.eclipse.uprotocol.v1.UAttributes; + import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipse/uprotocol/uuid/factory/UuidUtilsTest.java b/src/test/java/org/eclipse/uprotocol/uuid/factory/UuidUtilsTest.java index 4715e14d..882fe73a 100644 --- a/src/test/java/org/eclipse/uprotocol/uuid/factory/UuidUtilsTest.java +++ b/src/test/java/org/eclipse/uprotocol/uuid/factory/UuidUtilsTest.java @@ -12,7 +12,7 @@ */ package org.eclipse.uprotocol.uuid.factory; -import org.eclipse.uprotocol.v1.*; +import org.eclipse.uprotocol.v1.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test;