Skip to content

Commit

Permalink
Use explicit includes per reviewer feedback and moved UMessageBuilder…
Browse files Browse the repository at this point in the history
… to transport
  • Loading branch information
czfdcn committed May 22, 2024
1 parent 49eede9 commit 961e0d3
Show file tree
Hide file tree
Showing 23 changed files with 90 additions and 27 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/eclipse/uprotocol/client/CallOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/eclipse/uprotocol/client/Notifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/eclipse/uprotocol/client/Publisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br>
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/eclipse/uprotocol/client/RpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/eclipse/uprotocol/client/RpcMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/eclipse/uprotocol/client/RpcServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/eclipse/uprotocol/client/UPayload.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.eclipse.uprotocol.client;

import org.eclipse.uprotocol.v1.*;
import org.eclipse.uprotocol.v1.UPayloadFormat;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 961e0d3

Please sign in to comment.