-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for more than one protocol for transport
Signed-off-by: Vacha Shah <[email protected]>
- Loading branch information
Showing
10 changed files
with
633 additions
and
436 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
server/src/main/java/org/opensearch/transport/BaseInboundMessage.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,37 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.transport; | ||
|
||
import org.opensearch.common.annotation.ExperimentalApi; | ||
|
||
/** | ||
* Base class for inbound data as a message. | ||
* Different implementations are used for different protocols. | ||
* | ||
* @opensearch.internal | ||
*/ | ||
@ExperimentalApi | ||
public interface BaseInboundMessage { | ||
|
||
/** | ||
* The protocol used to encode this message | ||
*/ | ||
static String NATIVE_PROTOCOL = "native"; | ||
static String PROTOBUF_PROTOCOL = "protobuf"; | ||
|
||
/** | ||
* @return the protocol used to encode this message | ||
*/ | ||
public String getProtocol(); | ||
|
||
/** | ||
* Set the protocol used to encode this message | ||
*/ | ||
public void setProtocol(); | ||
} |
406 changes: 18 additions & 388 deletions
406
server/src/main/java/org/opensearch/transport/InboundHandler.java
Large diffs are not rendered by default.
Oops, something went wrong.
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.