-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
20 changed files
with
994 additions
and
220 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
== Regenerating Self Signed SSL Certificates | ||
|
||
cd src/main/resources/ssl | ||
keytool -genkeypair -keystore keystore.p12 -storetype PKCS12 -storepass changeit -alias localhost -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=localhost" |
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
67 changes: 67 additions & 0 deletions
67
...etty/src/main/java/org/apache/camel/quarkus/component/netty/CustomCorrelationManager.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,67 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.quarkus.component.netty; | ||
|
||
import io.netty.channel.Channel; | ||
import io.netty.channel.ChannelHandlerContext; | ||
import org.apache.camel.component.netty.NettyCamelState; | ||
import org.apache.camel.component.netty.NettyCamelStateCorrelationManager; | ||
|
||
public class CustomCorrelationManager implements NettyCamelStateCorrelationManager { | ||
|
||
private volatile NettyCamelState stateA; | ||
private volatile NettyCamelState stateB; | ||
private volatile NettyCamelState stateC; | ||
|
||
@Override | ||
public void putState(Channel channel, NettyCamelState state) { | ||
String body = state.getExchange().getMessage().getBody(String.class); | ||
if ("A".equals(body)) { | ||
stateA = state; | ||
} else if ("B".equals(body)) { | ||
stateB = state; | ||
} else if ("C".equals(body)) { | ||
stateC = state; | ||
} | ||
} | ||
|
||
@Override | ||
public void removeState(ChannelHandlerContext ctx, Channel channel) { | ||
// noop | ||
} | ||
|
||
@Override | ||
public NettyCamelState getState(ChannelHandlerContext ctx, Channel channel, Object msg) { | ||
String body = msg.toString(); | ||
if (body.endsWith("A")) { | ||
stateA.getExchange().getMessage().setHeader("manager", this); | ||
return stateA; | ||
} else if (body.endsWith("B")) { | ||
stateB.getExchange().getMessage().setHeader("manager", this); | ||
return stateB; | ||
} else if (body.endsWith("C")) { | ||
stateC.getExchange().getMessage().setHeader("manager", this); | ||
return stateC; | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public NettyCamelState getState(ChannelHandlerContext ctx, Channel channel, Throwable cause) { | ||
return null; | ||
} | ||
} |
76 changes: 0 additions & 76 deletions
76
...-tests/netty/src/main/java/org/apache/camel/quarkus/component/netty/NettyCodecHelper.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.