-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Made ServiceCall and ClientTransport extend AutoCloseable. * Updated RSocketClientTransport to properly close rsocket channels - removed ThreadLocal map. * Changed approach with "gateway client transport " - compacted to have less classes as possible. * Added HttpGatewayClientTransport which implements ClientChannel, ClientTransport. * Added WebsocketGatewayClientTransportwhich implements ClientChannel, ClientTransport. * Re-packaged gateway client classes.
- Loading branch information
Showing
65 changed files
with
1,653 additions
and
2,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 0 additions & 82 deletions
82
services-gateway/src/main/java/io/scalecube/services/gateway/GatewayTemplate.java
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
services-gateway/src/main/java/io/scalecube/services/gateway/client/GatewayClientCodec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.scalecube.services.gateway.client; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import io.scalecube.services.api.ServiceMessage; | ||
import io.scalecube.services.exceptions.MessageCodecException; | ||
import java.lang.reflect.Type; | ||
|
||
public interface GatewayClientCodec { | ||
|
||
/** | ||
* Data decoder function. | ||
* | ||
* @param message client message. | ||
* @param dataType data type class. | ||
* @return client message object. | ||
* @throws MessageCodecException in case if data decoding fails. | ||
*/ | ||
default ServiceMessage decodeData(ServiceMessage message, Type dataType) | ||
throws MessageCodecException { | ||
return ServiceMessageCodec.decodeData(message, dataType); | ||
} | ||
|
||
/** | ||
* Encodes {@link ServiceMessage}. | ||
* | ||
* @param message message to encode | ||
* @return encoded message | ||
*/ | ||
ByteBuf encode(ServiceMessage message); | ||
|
||
/** | ||
* Decodes {@link ServiceMessage} object from {@link ByteBuf}. | ||
* | ||
* @param byteBuf message to decode | ||
* @return decoded message represented by {@link ServiceMessage} | ||
*/ | ||
ServiceMessage decode(ByteBuf byteBuf); | ||
} |
2 changes: 1 addition & 1 deletion
2
...ateway/transport/ServiceMessageCodec.java → ...s/gateway/client/ServiceMessageCodec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.