diff --git a/LICENSE b/LICENSE index 92754fc6..4b1262f6 100644 --- a/LICENSE +++ b/LICENSE @@ -21,9 +21,7 @@ outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License, and you have no - policy prohibiting employee contributions back to this work (unless - the contributor to this work is your current or retired employee). + exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation @@ -188,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [2005-2022] [Du Law Office - The jExpress Framework Project] + Copyright [2005-2026] [Du Law Office - The jExpress Framework Project] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 5b815bd6..467fe9aa 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,21 @@ + + diff --git a/run-debug.sh b/run-debug.sh index 42b55a84..ebd3cfab 100644 --- a/run-debug.sh +++ b/run-debug.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project +# +# Licensed 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 +# +# https://apache.org +# +# 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. +# +# + # shellcheck shell=bash # Check if Java was actually found diff --git a/src/main/java/org/summerboot/jexpress/boot/BackOffice.java b/src/main/java/org/summerboot/jexpress/boot/BackOffice.java index f939e2e7..40d88e71 100644 --- a/src/main/java/org/summerboot/jexpress/boot/BackOffice.java +++ b/src/main/java/org/summerboot/jexpress/boot/BackOffice.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/BootConstant.java b/src/main/java/org/summerboot/jexpress/boot/BootConstant.java index 1b32e247..c58b0ac9 100644 --- a/src/main/java/org/summerboot/jexpress/boot/BootConstant.java +++ b/src/main/java/org/summerboot/jexpress/boot/BootConstant.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/BootErrorCode.java b/src/main/java/org/summerboot/jexpress/boot/BootErrorCode.java index ce6fb857..9360b0b5 100644 --- a/src/main/java/org/summerboot/jexpress/boot/BootErrorCode.java +++ b/src/main/java/org/summerboot/jexpress/boot/BootErrorCode.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/BootGuiceModule.java b/src/main/java/org/summerboot/jexpress/boot/BootGuiceModule.java index c78a239f..f4afdd6c 100644 --- a/src/main/java/org/summerboot/jexpress/boot/BootGuiceModule.java +++ b/src/main/java/org/summerboot/jexpress/boot/BootGuiceModule.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/BootPOI.java b/src/main/java/org/summerboot/jexpress/boot/BootPOI.java index 56051a30..13bbd810 100644 --- a/src/main/java/org/summerboot/jexpress/boot/BootPOI.java +++ b/src/main/java/org/summerboot/jexpress/boot/BootPOI.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/MasterPassword.java b/src/main/java/org/summerboot/jexpress/boot/MasterPassword.java index 9dc9b1b1..e2676c02 100644 --- a/src/main/java/org/summerboot/jexpress/boot/MasterPassword.java +++ b/src/main/java/org/summerboot/jexpress/boot/MasterPassword.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/ScanedGuiceModule.java b/src/main/java/org/summerboot/jexpress/boot/ScanedGuiceModule.java index 31af343b..e1290e3d 100644 --- a/src/main/java/org/summerboot/jexpress/boot/ScanedGuiceModule.java +++ b/src/main/java/org/summerboot/jexpress/boot/ScanedGuiceModule.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; @@ -19,6 +20,7 @@ import com.google.inject.name.Names; import io.netty.channel.ChannelHandler; import org.summerboot.jexpress.boot.annotation.Service; +import org.summerboot.jexpress.nio.server.websocket.WebSocketAuthHandler_OTT; import org.summerboot.jexpress.util.BeanUtil; import java.util.HashMap; @@ -138,6 +140,13 @@ public void configure() { memo.append(BootConstant.BR).append("\t- Ioc.userdefined.ChannelHandlers: ").append(c); } catch (RuntimeException ex) { } + Set namedWebsocket = channelHandlerNames.get(Service.ChannelHandlerType.Websocket); + for (String s : namedWebsocket) { + if (s == null || !s.startsWith(WebSocketAuthHandler_OTT.WS_PATH_PREFIX + "/")) { + String errorMessage = "@Service(binding = ChannelHandler.class, named = \"" + s + "\", type = Service.ChannelHandlerType.Websocket): named field value must start with " + WebSocketAuthHandler_OTT.WS_PATH_PREFIX + "/, but found: " + s; + throw new IllegalArgumentException(errorMessage); + } + } } } diff --git a/src/main/java/org/summerboot/jexpress/boot/SummerApplication.java b/src/main/java/org/summerboot/jexpress/boot/SummerApplication.java index 01bebcbc..4e650073 100644 --- a/src/main/java/org/summerboot/jexpress/boot/SummerApplication.java +++ b/src/main/java/org/summerboot/jexpress/boot/SummerApplication.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/SummerBigBang.java b/src/main/java/org/summerboot/jexpress/boot/SummerBigBang.java index 4ca3b64d..506d6f54 100644 --- a/src/main/java/org/summerboot/jexpress/boot/SummerBigBang.java +++ b/src/main/java/org/summerboot/jexpress/boot/SummerBigBang.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/SummerInitializer.java b/src/main/java/org/summerboot/jexpress/boot/SummerInitializer.java index c07a2264..e9030c78 100644 --- a/src/main/java/org/summerboot/jexpress/boot/SummerInitializer.java +++ b/src/main/java/org/summerboot/jexpress/boot/SummerInitializer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project licenses this file to you under the Apache License, appVersionLong 2.0 (the - * "License"); you may not use this file except in compliance with the License and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/SummerSingularity.java b/src/main/java/org/summerboot/jexpress/boot/SummerSingularity.java index dcfa046a..5f157b37 100644 --- a/src/main/java/org/summerboot/jexpress/boot/SummerSingularity.java +++ b/src/main/java/org/summerboot/jexpress/boot/SummerSingularity.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Controller.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Controller.java index 50ea1db8..0f9dcfdf 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Controller.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Controller.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Daemon.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Daemon.java index 328cc3fc..4d3dca1a 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Daemon.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Daemon.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/GrpcController.java b/src/main/java/org/summerboot/jexpress/boot/annotation/GrpcController.java index 7c26b768..2bd5a656 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/GrpcController.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/GrpcController.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/HealthCheck.java b/src/main/java/org/summerboot/jexpress/boot/annotation/HealthCheck.java index eff2e3bf..537eabcd 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/HealthCheck.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/HealthCheck.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Log.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Log.java index 6d27dec6..c0ff93d0 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Log.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Log.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Order.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Order.java index 5c5e1530..bd5e16b8 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Order.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Order.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/ParamCollectionDelimiter.java b/src/main/java/org/summerboot/jexpress/boot/annotation/ParamCollectionDelimiter.java index bd0f40ad..bcb13bcd 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/ParamCollectionDelimiter.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/ParamCollectionDelimiter.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Ping.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Ping.java index b83b33a5..f1799120 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Ping.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Ping.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/RequiresHealthCheck.java b/src/main/java/org/summerboot/jexpress/boot/annotation/RequiresHealthCheck.java index 4f4172d4..5faa578d 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/RequiresHealthCheck.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/RequiresHealthCheck.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Scheduled.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Scheduled.java index 0f08837b..3909990e 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Scheduled.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Scheduled.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Service.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Service.java index 40878e8d..b4c1a163 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Service.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Service.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Unique.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Unique.java index 218ea9df..b9a5fef3 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Unique.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Unique.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/UniqueIgnore.java b/src/main/java/org/summerboot/jexpress/boot/annotation/UniqueIgnore.java index 30a603eb..2f656171 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/UniqueIgnore.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/UniqueIgnore.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/annotation/Version.java b/src/main/java/org/summerboot/jexpress/boot/annotation/Version.java index 419fb8d1..510a5497 100644 --- a/src/main/java/org/summerboot/jexpress/boot/annotation/Version.java +++ b/src/main/java/org/summerboot/jexpress/boot/annotation/Version.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/BootConfig.java b/src/main/java/org/summerboot/jexpress/boot/config/BootConfig.java index 9018c516..b78ca285 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/BootConfig.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/BootConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/ConfigUtil.java b/src/main/java/org/summerboot/jexpress/boot/config/ConfigUtil.java index 197c9128..1ea931a9 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/ConfigUtil.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/ConfigUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/ConfigurationMonitor.java b/src/main/java/org/summerboot/jexpress/boot/config/ConfigurationMonitor.java index ed95746e..3b49d90d 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/ConfigurationMonitor.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/ConfigurationMonitor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/JExpressConfig.java b/src/main/java/org/summerboot/jexpress/boot/config/JExpressConfig.java index 6b437a8c..add1b953 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/JExpressConfig.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/JExpressConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/NamedDefaultThreadFactory.java b/src/main/java/org/summerboot/jexpress/boot/config/NamedDefaultThreadFactory.java index 082e21aa..b47b28dc 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/NamedDefaultThreadFactory.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/NamedDefaultThreadFactory.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/annotation/Config.java b/src/main/java/org/summerboot/jexpress/boot/config/annotation/Config.java index c65735e0..5ddc13ea 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/annotation/Config.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/annotation/Config.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/annotation/ConfigHeader.java b/src/main/java/org/summerboot/jexpress/boot/config/annotation/ConfigHeader.java index f2e6647a..d27189cc 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/annotation/ConfigHeader.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/annotation/ConfigHeader.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/config/annotation/ImportResource.java b/src/main/java/org/summerboot/jexpress/boot/config/annotation/ImportResource.java index d01e6567..6535a66e 100644 --- a/src/main/java/org/summerboot/jexpress/boot/config/annotation/ImportResource.java +++ b/src/main/java/org/summerboot/jexpress/boot/config/annotation/ImportResource.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.config.annotation; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleHandler.java b/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleHandler.java index 183c3e83..36d6d1a1 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleHandler.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleListener.java b/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleListener.java index 104b9479..e59f8f3a 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleListener.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/AppLifecycleListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionHandler.java b/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionHandler.java index af9ac231..20c5fc26 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionHandler.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionListener.java b/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionListener.java index 7600c976..837195a8 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionListener.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/HttpExceptionListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleHandler.java b/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleHandler.java index 940c313d..6748a190 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleHandler.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleListener.java b/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleListener.java index 297bee1d..0e82ca43 100644 --- a/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleListener.java +++ b/src/main/java/org/summerboot/jexpress/boot/event/HttpLifecycleListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.event; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HTTPClientStatusListener.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HTTPClientStatusListener.java index 92fd2a52..049612a5 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HTTPClientStatusListener.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HTTPClientStatusListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthChecker.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthChecker.java index 9c9a4b53..b1f5689a 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthChecker.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthChecker.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthMonitor.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthMonitor.java index 19f8cbe8..e32e109e 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthMonitor.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/HealthMonitor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/IOStatusData.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/IOStatusData.java index 11b52414..9b9bf8bd 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/IOStatusData.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/IOStatusData.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/NIOStatusListener.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/NIOStatusListener.java index 1dd03ee6..70c93ac3 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/NIOStatusListener.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/NIOStatusListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/Timeout.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/Timeout.java index 499305ba..f8482b76 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/Timeout.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/Timeout.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/BootIOStatusData.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/BootIOStatusData.java index 99cddcc2..85875c24 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/BootIOStatusData.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/BootIOStatusData.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation.jmx; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgr.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgr.java index 01923a4d..f1b4eee1 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgr.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgr.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation.jmx; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgrImpl.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgrImpl.java index 2060bd68..c79a509e 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgrImpl.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/InstrumentationMgrImpl.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation.jmx; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatus.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatus.java index 4eb43d02..77f99180 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatus.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatus.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation.jmx; diff --git a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatusMBean.java b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatusMBean.java index 88f9e84b..f3805a2b 100644 --- a/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatusMBean.java +++ b/src/main/java/org/summerboot/jexpress/boot/instrumentation/jmx/ServerStatusMBean.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.boot.instrumentation.jmx; diff --git a/src/main/java/org/summerboot/jexpress/i18n/AppResourceBundle.java b/src/main/java/org/summerboot/jexpress/i18n/AppResourceBundle.java index ec9bbb81..2c5400fc 100644 --- a/src/main/java/org/summerboot/jexpress/i18n/AppResourceBundle.java +++ b/src/main/java/org/summerboot/jexpress/i18n/AppResourceBundle.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.i18n; diff --git a/src/main/java/org/summerboot/jexpress/i18n/AppResourceCfg.java b/src/main/java/org/summerboot/jexpress/i18n/AppResourceCfg.java index c07f0f14..e9afa931 100644 --- a/src/main/java/org/summerboot/jexpress/i18n/AppResourceCfg.java +++ b/src/main/java/org/summerboot/jexpress/i18n/AppResourceCfg.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.i18n; diff --git a/src/main/java/org/summerboot/jexpress/i18n/I18n.java b/src/main/java/org/summerboot/jexpress/i18n/I18n.java index 44f5bc7f..cc18dd00 100644 --- a/src/main/java/org/summerboot/jexpress/i18n/I18n.java +++ b/src/main/java/org/summerboot/jexpress/i18n/I18n.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.i18n; diff --git a/src/main/java/org/summerboot/jexpress/i18n/I18nLabel.java b/src/main/java/org/summerboot/jexpress/i18n/I18nLabel.java index 0f42ab29..6feae397 100644 --- a/src/main/java/org/summerboot/jexpress/i18n/I18nLabel.java +++ b/src/main/java/org/summerboot/jexpress/i18n/I18nLabel.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.i18n; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCache.java b/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCache.java index 9cc7176f..d42d74bc 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCache.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCache.java @@ -1,23 +1,25 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; import org.summerboot.jexpress.boot.BootErrorCode; import org.summerboot.jexpress.boot.instrumentation.HealthChecker; import org.summerboot.jexpress.nio.server.domain.Err; +import org.summerboot.jexpress.security.auth.Caller; import java.util.ArrayList; import java.util.List; @@ -57,4 +59,21 @@ default List ping(Object... params) { void blacklist(String key, String value, long ttlMilliseconds); boolean isBlacklist(String key); + + /** + * store it in redis with key "ws:ticket:" + oneTimeTicket, value = caller (or json string), + * + * @param key + * @param caller + * @param ttlMilliseconds + */ + void oneTimeTicketPut(String key, Caller caller, long ttlMilliseconds); + + /** + * call redis.getdel("ws:ticket:" + oneTimeTicket) + * + * @param key + * @return + */ + Caller oneTimeTicketVerifyAndDestroy(String key); } diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCacheLocalImpl.java b/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCacheLocalImpl.java index 0c8947a0..76e6bd4c 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCacheLocalImpl.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/AuthTokenCacheLocalImpl.java @@ -1,21 +1,25 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; import com.google.inject.Singleton; +import org.summerboot.jexpress.security.auth.Caller; +import org.summerboot.jexpress.security.auth.User; +import org.summerboot.jexpress.util.BeanUtil; /** * @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵 @@ -34,4 +38,21 @@ public boolean isBlacklist(String key) { String v = get(key); return v != null; } + + private static final String OTT_KEY_PREFIX = "ws:ticket:"; + + @Override + public void oneTimeTicketPut(String key, Caller caller, long ttlMilliseconds) { + put(OTT_KEY_PREFIX + key, BeanUtil.toJson(caller, false, true), ttlMilliseconds); + } + + @Override + public Caller oneTimeTicketVerifyAndDestroy(String key) { + String json = get(OTT_KEY_PREFIX + key); + if (json != null) { + delete(OTT_KEY_PREFIX + key); + return BeanUtil.fromJson(json, User.class); + } + return null; + } } diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/BootCache.java b/src/main/java/org/summerboot/jexpress/integration/cache/BootCache.java index d8c847ae..a7070397 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/BootCache.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/BootCache.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/BootCache_RedisImple.java b/src/main/java/org/summerboot/jexpress/integration/cache/BootCache_RedisImple.java index 5157879b..4392630c 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/BootCache_RedisImple.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/BootCache_RedisImple.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; @@ -23,6 +24,7 @@ import org.summerboot.jexpress.integration.cache.domain.FlashSale; import org.summerboot.jexpress.integration.smtp.PostOffice; import org.summerboot.jexpress.integration.smtp.SMTPClientConfig; +import org.summerboot.jexpress.security.auth.Caller; import redis.clients.jedis.Jedis; import redis.clients.jedis.Pipeline; import redis.clients.jedis.Response; @@ -281,6 +283,28 @@ public boolean isBlacklist(String key) { return holder.value(); } + /** + * store it in redis with key "ws:ticket:" + oneTimeTicket, value = caller (or json string), + * + * @param key + * @param caller + * @param ttlMilliseconds + */ + @Override + public void oneTimeTicketPut(String key, Caller caller, long ttlMilliseconds) { + } + + /** + * call redis.getdel("ws:ticket:" + oneTimeTicket) + * + * @param key + * @return + */ + @Override + public Caller oneTimeTicketVerifyAndDestroy(String key) { + return null; + } + @Override public boolean flashsaleInventoryInit(String itemId, long totalAmount, long limit) { final Holder holder = new Holder<>(false); diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/JedisCall.java b/src/main/java/org/summerboot/jexpress/integration/cache/JedisCall.java index ada0b3e8..462d4a5c 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/JedisCall.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/JedisCall.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/RedisConfig.java b/src/main/java/org/summerboot/jexpress/integration/cache/RedisConfig.java index 501b248a..cb14a46f 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/RedisConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/RedisConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCache.java b/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCache.java index 814009d7..946241e5 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCache.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCache.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCacheImpl.java b/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCacheImpl.java index a89ebbc7..a6b1a061 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCacheImpl.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/SimpleLocalCacheImpl.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache; diff --git a/src/main/java/org/summerboot/jexpress/integration/cache/domain/FlashSale.java b/src/main/java/org/summerboot/jexpress/integration/cache/domain/FlashSale.java index 181aa6f6..9df84627 100644 --- a/src/main/java/org/summerboot/jexpress/integration/cache/domain/FlashSale.java +++ b/src/main/java/org/summerboot/jexpress/integration/cache/domain/FlashSale.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.cache.domain; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/HTTPClientStringSubscriber.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/HTTPClientStringSubscriber.java index 6461e00c..8b97fa45 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/HTTPClientStringSubscriber.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/HTTPClientStringSubscriber.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/HttpClientConfig.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/HttpClientConfig.java index be4ab0df..d3c9baf3 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/HttpClientConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/HttpClientConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate.java index 66055b94..29142392 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate_HTTPClientImpl.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate_HTTPClientImpl.java index 0511b190..93c40c41 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate_HTTPClientImpl.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCDelegate_HTTPClientImpl.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCError.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCError.java index aae8ad4d..8dfef722 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCError.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCError.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCMemo.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCMemo.java index bf5445bb..1bee438d 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCMemo.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCMemo.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; diff --git a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCResult.java b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCResult.java index dac38cdc..f926fc4b 100644 --- a/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCResult.java +++ b/src/main/java/org/summerboot/jexpress/integration/httpclient/RPCResult.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.httpclient; @@ -87,8 +88,7 @@ public RPCResult(HttpRequest originRequest, String originRequestBody, HttpRespon } if (httpClientConfig == null) { this.httpClientConfiguredObjectMapper = switch (contentType) { - case JSON, OTHER -> - BeanUtil.buildJsonMapper(TimeZone.getDefault(), true, false, false, true, true).build(); + case JSON, OTHER -> BeanUtil.buildJsonMapper(TimeZone.getDefault(), true, false, false, true, true).build(); case XML -> BeanUtil.buildXmlMapper(TimeZone.getDefault(), true, false, false, true, true).build(); }; } else { diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntity.java b/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntity.java index 8be92cb4..ff267373 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntity.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntity.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntityEx.java b/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntityEx.java index 0897ae66..ec768c15 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntityEx.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/AbstractEntityEx.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/Entity.java b/src/main/java/org/summerboot/jexpress/integration/jpa/Entity.java index a4477d34..e5f967e2 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/Entity.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/Entity.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/EntityEx.java b/src/main/java/org/summerboot/jexpress/integration/jpa/EntityEx.java index af9b24eb..62543752 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/EntityEx.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/EntityEx.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/JPAConfig.java b/src/main/java/org/summerboot/jexpress/integration/jpa/JPAConfig.java index 8a49a8ae..3b7dff92 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/JPAConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/JPAConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/jpa/JPAHibernateConfig.java b/src/main/java/org/summerboot/jexpress/integration/jpa/JPAHibernateConfig.java index 87ebbbd6..8eda2dfb 100644 --- a/src/main/java/org/summerboot/jexpress/integration/jpa/JPAHibernateConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/jpa/JPAHibernateConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.jpa; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapAgent.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapAgent.java index 17d11b56..c49f5cab 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapAgent.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapAgent.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory1.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory1.java index 0b0cc245..3a5c8162 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory1.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory1.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory2.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory2.java index 712574a1..758f00e1 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory2.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory2.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory3.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory3.java index 81356221..6c0e23fd 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory3.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory3.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory4.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory4.java index 44636963..124a395a 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory4.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory4.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory5.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory5.java index 92442159..4c571bd0 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory5.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory5.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory6.java b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory6.java index 51da3aa6..a1bc64f0 100644 --- a/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory6.java +++ b/src/main/java/org/summerboot/jexpress/integration/ldap/LdapSSLConnectionFactory6.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.ldap; diff --git a/src/main/java/org/summerboot/jexpress/integration/mqtt/MqttClientConfig.java b/src/main/java/org/summerboot/jexpress/integration/mqtt/MqttClientConfig.java index 385e3196..de7caf20 100644 --- a/src/main/java/org/summerboot/jexpress/integration/mqtt/MqttClientConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/mqtt/MqttClientConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.mqtt; diff --git a/src/main/java/org/summerboot/jexpress/integration/quartz/BootJobListener.java b/src/main/java/org/summerboot/jexpress/integration/quartz/BootJobListener.java index df0e102b..6355627c 100644 --- a/src/main/java/org/summerboot/jexpress/integration/quartz/BootJobListener.java +++ b/src/main/java/org/summerboot/jexpress/integration/quartz/BootJobListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.quartz; diff --git a/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceJobFactory.java b/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceJobFactory.java index 62455bcb..903e38f7 100644 --- a/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceJobFactory.java +++ b/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceJobFactory.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.quartz; diff --git a/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceSchedulerProvider.java b/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceSchedulerProvider.java index 9ac554d9..4b09e061 100644 --- a/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceSchedulerProvider.java +++ b/src/main/java/org/summerboot/jexpress/integration/quartz/GuiceSchedulerProvider.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.quartz; diff --git a/src/main/java/org/summerboot/jexpress/integration/quartz/QuartzUtil.java b/src/main/java/org/summerboot/jexpress/integration/quartz/QuartzUtil.java index cae04e1a..6307af08 100644 --- a/src/main/java/org/summerboot/jexpress/integration/quartz/QuartzUtil.java +++ b/src/main/java/org/summerboot/jexpress/integration/quartz/QuartzUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.quartz; diff --git a/src/main/java/org/summerboot/jexpress/integration/smtp/BootPostOfficeImpl.java b/src/main/java/org/summerboot/jexpress/integration/smtp/BootPostOfficeImpl.java index 7a79e32e..07e6db64 100644 --- a/src/main/java/org/summerboot/jexpress/integration/smtp/BootPostOfficeImpl.java +++ b/src/main/java/org/summerboot/jexpress/integration/smtp/BootPostOfficeImpl.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.smtp; diff --git a/src/main/java/org/summerboot/jexpress/integration/smtp/Email.java b/src/main/java/org/summerboot/jexpress/integration/smtp/Email.java index 220ef07b..6f3912bc 100644 --- a/src/main/java/org/summerboot/jexpress/integration/smtp/Email.java +++ b/src/main/java/org/summerboot/jexpress/integration/smtp/Email.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.smtp; diff --git a/src/main/java/org/summerboot/jexpress/integration/smtp/EmailBuilder.java b/src/main/java/org/summerboot/jexpress/integration/smtp/EmailBuilder.java index b8925862..48f8cd5a 100644 --- a/src/main/java/org/summerboot/jexpress/integration/smtp/EmailBuilder.java +++ b/src/main/java/org/summerboot/jexpress/integration/smtp/EmailBuilder.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.smtp; diff --git a/src/main/java/org/summerboot/jexpress/integration/smtp/PostOffice.java b/src/main/java/org/summerboot/jexpress/integration/smtp/PostOffice.java index a93c0341..04fff27a 100644 --- a/src/main/java/org/summerboot/jexpress/integration/smtp/PostOffice.java +++ b/src/main/java/org/summerboot/jexpress/integration/smtp/PostOffice.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.smtp; diff --git a/src/main/java/org/summerboot/jexpress/integration/smtp/SMTPClientConfig.java b/src/main/java/org/summerboot/jexpress/integration/smtp/SMTPClientConfig.java index 635f377c..b90d1609 100644 --- a/src/main/java/org/summerboot/jexpress/integration/smtp/SMTPClientConfig.java +++ b/src/main/java/org/summerboot/jexpress/integration/smtp/SMTPClientConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.integration.smtp; diff --git a/src/main/java/org/summerboot/jexpress/nio/IdleEventMonitor.java b/src/main/java/org/summerboot/jexpress/nio/IdleEventMonitor.java index aea843aa..176b76fc 100644 --- a/src/main/java/org/summerboot/jexpress/nio/IdleEventMonitor.java +++ b/src/main/java/org/summerboot/jexpress/nio/IdleEventMonitor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/BearerAuthCredential.java b/src/main/java/org/summerboot/jexpress/nio/grpc/BearerAuthCredential.java index fd558306..993d4f86 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/BearerAuthCredential.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/BearerAuthCredential.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/BootLoadBalancerProvider.java b/src/main/java/org/summerboot/jexpress/nio/grpc/BootLoadBalancerProvider.java index 35ffd37c..cb0a44cf 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/BootLoadBalancerProvider.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/BootLoadBalancerProvider.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/ContextualizedServerCallListenerEx.java b/src/main/java/org/summerboot/jexpress/nio/grpc/ContextualizedServerCallListenerEx.java index cab43d81..54a689f0 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/ContextualizedServerCallListenerEx.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/ContextualizedServerCallListenerEx.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClient.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClient.java index 866e5393..0c88caa1 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClient.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClient.java @@ -1,18 +1,19 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClientConfig.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClientConfig.java index cae1b13c..dd18223b 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClientConfig.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCClientConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServer.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServer.java index e9ce29c9..fb476ebc 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServer.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServerConfig.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServerConfig.java index b303883a..af79f541 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServerConfig.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServerConfig.java @@ -1 +1 @@ -/* * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project * * The Summer Boot Project 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 and you have no * policy prohibiting employee contributions back to this file (unless the contributor to this * file is your current or retired employee). You may obtain a copy of the License at: * * https://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.summerboot.jexpress.nio.grpc; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; import org.summerboot.jexpress.boot.BootConstant; import org.summerboot.jexpress.boot.config.BootConfig; import org.summerboot.jexpress.boot.config.ConfigUtil; import org.summerboot.jexpress.boot.config.annotation.Config; import org.summerboot.jexpress.boot.config.annotation.ConfigHeader; import org.summerboot.jexpress.security.SecurityUtil; import org.summerboot.jexpress.util.GeoIpUtil; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.TrustManagerFactory; import java.io.File; import java.io.IOException; import java.net.InetSocketAddress; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.concurrent.ThreadPoolExecutor; /** * @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵 */ @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) //@ImportResource(BootConstant.FILE_CFG_GRPC) public class GRPCServerConfig extends BootConfig { public static void main(String[] args) { String t = generateTemplate(GRPCServerConfig.class); System.out.println(t); } protected static final String FILENAME_TRUSTSTORE_4SERVER = "truststore_grpc_server.p12"; protected final static String ID = "gRpc.server"; public static final GRPCServerConfig cfg = new GRPCServerConfig(); protected GRPCServerConfig() { } @Override protected void reset() { tpeCore = BootConstant.CPU_CORE * 2 + 1; tpeMax = BootConstant.CPU_CORE * 2 + 1; } //1. gRPC server config @ConfigHeader(title = "1. " + ID + " Network Listeners", format = "ip1:port1, ip2:port2, ..., ipN:portN", example = "192.168.1.10:8424, 127.0.0.1:8424, 0.0.0.0:8424") @Config(key = ID + ".bindings", predefinedValue = "0.0.0.0:8424, 0.0.0.0:8425", required = true) protected volatile List bindingAddresses; @Config(key = ID + ".autostart", defaultValue = "true") protected volatile boolean autoStart; @Config(key = ID + ".idle.threshold.second", defaultValue = "59", desc = "make it prime number when you have both NIO and gRPC server running") protected volatile int idleThresholdSecond; @Config(key = ID + ".CallerAddressFilter.option", defaultValue = "String", desc = "valid value = String, HostString, HostName, AddressStirng, HostAddress, AddrHostName, CanonicalHostName") protected volatile GeoIpUtil.CallerAddressFilterOption CallerAddressFilterOption = GeoIpUtil.CallerAddressFilterOption.String; @Config(key = ID + ".CallerAddressFilter.Whitelist", desc = "Whitelist in CSV format, example: 127.0.0.1, 192\\\\.168\\\\.1\\\\.") protected volatile Set callerAddressFilterWhitelist; @Config(key = ID + ".CallerAddressFilter.Blacklist", desc = "Blacklist in CSV format, example: 10.1.1.40, 192\\\\.168\\\\.2\\\\.") protected volatile Set callerAddressFilterBlacklist; @Config(key = ID + ".pool.BizExecutor.mode", defaultValue = "VirtualThread", desc = "valid value = VirtualThread (default for Java 21+), CPU, IO and Mixed (default for old Java)\n use CPU core + 1 when application is CPU bound\n" + "use CPU core x 2 + 1 when application is I/O bound\n" + "need to find the best value based on your performance test result when nio.server.BizExecutor.mode=Mixed") protected volatile ThreadingMode tpeThreadingMode = ThreadingMode.VirtualThread; @Config(key = ID + ".pool.coreSize", predefinedValue = "0", desc = "coreSize 0 = current computer/VM's available processors x 2 + 1") protected volatile int tpeCore = BootConstant.CPU_CORE * 2 + 1; @Config(key = ID + ".pool.maxSize", predefinedValue = "0", desc = "maxSize 0 = current computer/VM's available processors x 2 + 1") protected volatile int tpeMax = BootConstant.CPU_CORE * 2 + 1; @Config(key = ID + ".pool.queueSize", defaultValue = "" + Integer.MAX_VALUE, desc = "The waiting list size when the pool is full") protected volatile int tpeQueue = Integer.MAX_VALUE; @Config(key = ID + ".pool.keepAliveSeconds", defaultValue = "60") protected volatile long tpeKeepAliveSeconds = 60; @Config(key = ID + ".pool.prestartAllCoreThreads", defaultValue = "false") protected boolean prestartAllCoreThreads = false; @Config(key = ID + ".pool.allowCoreThreadTimeOut", defaultValue = "false") protected boolean allowCoreThreadTimeOut = false; protected ThreadPoolExecutor tpe = null; //2. TRC (The Remote Callee) keystore protected static final String KEY_kmf_key = ID + ".ssl.KeyStore"; protected static final String KEY_kmf_StorePwdKey = ID + ".ssl.KeyStorePwd"; protected static final String KEY_kmf_AliasKey = ID + ".ssl.KeyAlias"; protected static final String KEY_kmf_AliasPwdKey = ID + ".ssl.KeyPwd"; @ConfigHeader(title = "2. " + ID + " keystore") @Config(key = KEY_kmf_key, StorePwdKey = KEY_kmf_StorePwdKey, AliasKey = KEY_kmf_AliasKey, AliasPwdKey = KEY_kmf_AliasPwdKey, desc = "Path to key store file. Use SSL/TLS when keystore is provided, otherwise use plain socket", callbackMethodName4Dump = "generateTemplate_keystore") //@JsonIgnore protected volatile KeyManagerFactory kmf; protected void generateTemplate_keystore(StringBuilder sb, Properties currentValues) { appendCurrentValue(KEY_kmf_key, currentValues, FILENAME_KEYSTORE, sb); appendCurrentValue(KEY_kmf_StorePwdKey, currentValues, DEFAULT_DEC_VALUE, sb); appendCurrentValue(KEY_kmf_AliasKey, currentValues, "server2_4096.jexpress.org", sb); appendCurrentValue(KEY_kmf_AliasPwdKey, currentValues, DEFAULT_DEC_VALUE, sb); generateTemplate = true; } //3. TRC (The Remote Callee) truststore protected static final String KEY_tmf_key = ID + ".ssl.TrustStore"; protected static final String KEY_tmf_StorePwdKey = ID + ".ssl.TrustStorePwd"; @ConfigHeader(title = "3. " + ID + " truststore") @Config(key = KEY_tmf_key, StorePwdKey = KEY_tmf_StorePwdKey, callbackMethodName4Dump = "generateTemplate_truststore", desc = DESC_TMF_SERVER) @JsonIgnore protected volatile TrustManagerFactory tmf; protected void generateTemplate_truststore(StringBuilder sb, Properties currentValues) { appendCurrentValue(KEY_tmf_key, currentValues, FILENAME_TRUSTSTORE_4SERVER, sb, true); appendCurrentValue(KEY_tmf_StorePwdKey, currentValues, DEFAULT_DEC_VALUE, sb, true); generateTemplate = true; } @Override protected void preLoad(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) { createIfNotExist(FILENAME_SRC_TRUSTSTORE, FILENAME_KEYSTORE); createIfNotExist(FILENAME_SRC_TRUSTSTORE, FILENAME_TRUSTSTORE_4SERVER); } @Override protected void loadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) throws IOException { // pre-compile regexes for whitelist and blacklist if (callerAddressFilterWhitelist != null) { for (String regex : callerAddressFilterWhitelist) { SecurityUtil.matches("", regex); } } if (callerAddressFilterBlacklist != null) { for (String regex : callerAddressFilterBlacklist) { SecurityUtil.matches("", regex); } } tpe = buildThreadPoolExecutor(tpe, "Netty-gRPC.Biz", tpeThreadingMode, tpeCore, tpeMax, tpeQueue, tpeKeepAliveSeconds, null, prestartAllCoreThreads, allowCoreThreadTimeOut, true); } @Override public void shutdown() { if (tpe != null && !tpe.isShutdown()) { tpe.shutdown(); } } public List getBindingAddresses() { return bindingAddresses; } public boolean isAutoStart() { return autoStart; } public int getIdleThresholdSecond() { return idleThresholdSecond; } public GeoIpUtil.CallerAddressFilterOption getCallerAddressFilterOption() { return CallerAddressFilterOption; } public Set getCallerAddressFilterWhitelist() { return callerAddressFilterWhitelist; } public Set getCallerAddressFilterBlacklist() { return callerAddressFilterBlacklist; } public ThreadingMode getTpeThreadingMode() { return tpeThreadingMode; } public int getTpeCore() { return tpeCore; } public int getTpeMax() { return tpeMax; } public int getTpeQueue() { return tpeQueue; } public long getTpeKeepAliveSeconds() { return tpeKeepAliveSeconds; } public ThreadPoolExecutor getTpe() { return tpe; } public KeyManagerFactory getKmf() { return kmf; } public TrustManagerFactory getTmf() { return tmf; } } \ No newline at end of file +/* * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * * Licensed 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 * * https://apache.org * * 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.summerboot.jexpress.nio.grpc; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnore; import org.summerboot.jexpress.boot.BootConstant; import org.summerboot.jexpress.boot.config.BootConfig; import org.summerboot.jexpress.boot.config.ConfigUtil; import org.summerboot.jexpress.boot.config.annotation.Config; import org.summerboot.jexpress.boot.config.annotation.ConfigHeader; import org.summerboot.jexpress.security.SecurityUtil; import org.summerboot.jexpress.util.GeoIpUtil; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.TrustManagerFactory; import java.io.File; import java.io.IOException; import java.net.InetSocketAddress; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.concurrent.ThreadPoolExecutor; /** * @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵 */ @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) //@ImportResource(BootConstant.FILE_CFG_GRPC) public class GRPCServerConfig extends BootConfig { public static void main(String[] args) { String t = generateTemplate(GRPCServerConfig.class); System.out.println(t); } protected static final String FILENAME_TRUSTSTORE_4SERVER = "truststore_grpc_server.p12"; protected final static String ID = "gRpc.server"; public static final GRPCServerConfig cfg = new GRPCServerConfig(); protected GRPCServerConfig() { } @Override protected void reset() { tpeCore = BootConstant.CPU_CORE * 2 + 1; tpeMax = BootConstant.CPU_CORE * 2 + 1; } //1. gRPC server config @ConfigHeader(title = "1. " + ID + " Network Listeners", format = "ip1:port1, ip2:port2, ..., ipN:portN", example = "192.168.1.10:8424, 127.0.0.1:8424, 0.0.0.0:8424") @Config(key = ID + ".bindings", predefinedValue = "0.0.0.0:8424, 0.0.0.0:8425", required = true) protected volatile List bindingAddresses; @Config(key = ID + ".autostart", defaultValue = "true") protected volatile boolean autoStart; @Config(key = ID + ".idle.threshold.second", defaultValue = "59", desc = "make it prime number when you have both NIO and gRPC server running") protected volatile int idleThresholdSecond; @Config(key = ID + ".CallerAddressFilter.option", defaultValue = "String", desc = "valid value = String, HostString, HostName, AddressStirng, HostAddress, AddrHostName, CanonicalHostName") protected volatile GeoIpUtil.CallerAddressFilterOption CallerAddressFilterOption = GeoIpUtil.CallerAddressFilterOption.String; @Config(key = ID + ".CallerAddressFilter.Whitelist", desc = "Whitelist in CSV format, example: 127.0.0.1, 192\\\\.168\\\\.1\\\\.") protected volatile Set callerAddressFilterWhitelist; @Config(key = ID + ".CallerAddressFilter.Blacklist", desc = "Blacklist in CSV format, example: 10.1.1.40, 192\\\\.168\\\\.2\\\\.") protected volatile Set callerAddressFilterBlacklist; @Config(key = ID + ".pool.BizExecutor.mode", defaultValue = "VirtualThread", desc = "valid value = VirtualThread (default for Java 21+), CPU, IO and Mixed (default for old Java)\n use CPU core + 1 when application is CPU bound\n" + "use CPU core x 2 + 1 when application is I/O bound\n" + "need to find the best value based on your performance test result when nio.server.BizExecutor.mode=Mixed") protected volatile ThreadingMode tpeThreadingMode = ThreadingMode.VirtualThread; @Config(key = ID + ".pool.coreSize", predefinedValue = "0", desc = "coreSize 0 = current computer/VM's available processors x 2 + 1") protected volatile int tpeCore = BootConstant.CPU_CORE * 2 + 1; @Config(key = ID + ".pool.maxSize", predefinedValue = "0", desc = "maxSize 0 = current computer/VM's available processors x 2 + 1") protected volatile int tpeMax = BootConstant.CPU_CORE * 2 + 1; @Config(key = ID + ".pool.queueSize", defaultValue = "" + Integer.MAX_VALUE, desc = "The waiting list size when the pool is full") protected volatile int tpeQueue = Integer.MAX_VALUE; @Config(key = ID + ".pool.keepAliveSeconds", defaultValue = "60") protected volatile long tpeKeepAliveSeconds = 60; @Config(key = ID + ".pool.prestartAllCoreThreads", defaultValue = "false") protected boolean prestartAllCoreThreads = false; @Config(key = ID + ".pool.allowCoreThreadTimeOut", defaultValue = "false") protected boolean allowCoreThreadTimeOut = false; protected ThreadPoolExecutor tpe = null; //2. TRC (The Remote Callee) keystore protected static final String KEY_kmf_key = ID + ".ssl.KeyStore"; protected static final String KEY_kmf_StorePwdKey = ID + ".ssl.KeyStorePwd"; protected static final String KEY_kmf_AliasKey = ID + ".ssl.KeyAlias"; protected static final String KEY_kmf_AliasPwdKey = ID + ".ssl.KeyPwd"; @ConfigHeader(title = "2. " + ID + " keystore") @Config(key = KEY_kmf_key, StorePwdKey = KEY_kmf_StorePwdKey, AliasKey = KEY_kmf_AliasKey, AliasPwdKey = KEY_kmf_AliasPwdKey, desc = "Path to key store file. Use SSL/TLS when keystore is provided, otherwise use plain socket", callbackMethodName4Dump = "generateTemplate_keystore") //@JsonIgnore protected volatile KeyManagerFactory kmf; protected void generateTemplate_keystore(StringBuilder sb, Properties currentValues) { appendCurrentValue(KEY_kmf_key, currentValues, FILENAME_KEYSTORE, sb); appendCurrentValue(KEY_kmf_StorePwdKey, currentValues, DEFAULT_DEC_VALUE, sb); appendCurrentValue(KEY_kmf_AliasKey, currentValues, "server2_4096.jexpress.org", sb); appendCurrentValue(KEY_kmf_AliasPwdKey, currentValues, DEFAULT_DEC_VALUE, sb); generateTemplate = true; } //3. TRC (The Remote Callee) truststore protected static final String KEY_tmf_key = ID + ".ssl.TrustStore"; protected static final String KEY_tmf_StorePwdKey = ID + ".ssl.TrustStorePwd"; @ConfigHeader(title = "3. " + ID + " truststore") @Config(key = KEY_tmf_key, StorePwdKey = KEY_tmf_StorePwdKey, callbackMethodName4Dump = "generateTemplate_truststore", desc = DESC_TMF_SERVER) @JsonIgnore protected volatile TrustManagerFactory tmf; protected void generateTemplate_truststore(StringBuilder sb, Properties currentValues) { appendCurrentValue(KEY_tmf_key, currentValues, FILENAME_TRUSTSTORE_4SERVER, sb, true); appendCurrentValue(KEY_tmf_StorePwdKey, currentValues, DEFAULT_DEC_VALUE, sb, true); generateTemplate = true; } @Override protected void preLoad(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) { createIfNotExist(FILENAME_SRC_TRUSTSTORE, FILENAME_KEYSTORE); createIfNotExist(FILENAME_SRC_TRUSTSTORE, FILENAME_TRUSTSTORE_4SERVER); } @Override protected void loadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) throws IOException { // pre-compile regexes for whitelist and blacklist if (callerAddressFilterWhitelist != null) { for (String regex : callerAddressFilterWhitelist) { SecurityUtil.matches("", regex); } } if (callerAddressFilterBlacklist != null) { for (String regex : callerAddressFilterBlacklist) { SecurityUtil.matches("", regex); } } tpe = buildThreadPoolExecutor(tpe, "Netty-gRPC.Biz", tpeThreadingMode, tpeCore, tpeMax, tpeQueue, tpeKeepAliveSeconds, null, prestartAllCoreThreads, allowCoreThreadTimeOut, true); } @Override public void shutdown() { if (tpe != null && !tpe.isShutdown()) { tpe.shutdown(); } } public List getBindingAddresses() { return bindingAddresses; } public boolean isAutoStart() { return autoStart; } public int getIdleThresholdSecond() { return idleThresholdSecond; } public GeoIpUtil.CallerAddressFilterOption getCallerAddressFilterOption() { return CallerAddressFilterOption; } public Set getCallerAddressFilterWhitelist() { return callerAddressFilterWhitelist; } public Set getCallerAddressFilterBlacklist() { return callerAddressFilterBlacklist; } public ThreadingMode getTpeThreadingMode() { return tpeThreadingMode; } public int getTpeCore() { return tpeCore; } public int getTpeMax() { return tpeMax; } public int getTpeQueue() { return tpeQueue; } public long getTpeKeepAliveSeconds() { return tpeKeepAliveSeconds; } public ThreadPoolExecutor getTpe() { return tpe; } public KeyManagerFactory getKmf() { return kmf; } public TrustManagerFactory getTmf() { return tmf; } } \ No newline at end of file diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServiceCounter.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServiceCounter.java index 143060a8..f79d446e 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServiceCounter.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCServiceCounter.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCTestHelper.java b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCTestHelper.java index 440baf0c..c10e7e67 100644 --- a/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCTestHelper.java +++ b/src/main/java/org/summerboot/jexpress/nio/grpc/GRPCTestHelper.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.grpc; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/AbortPolicyWithReport.java b/src/main/java/org/summerboot/jexpress/nio/server/AbortPolicyWithReport.java index e8a6ce49..886134e3 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/AbortPolicyWithReport.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/AbortPolicyWithReport.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadHandler.java index 0964978b..44d0a1a6 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadRejector.java b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadRejector.java index c7edd7fa..5b02272b 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadRejector.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpFileUploadRejector.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpPingHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpPingHandler.java index 76239166..95625ed7 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpPingHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpPingHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpRequestHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpRequestHandler.java index 54eabb92..748d8228 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/BootHttpRequestHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/BootHttpRequestHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ErrorAuditor.java b/src/main/java/org/summerboot/jexpress/nio/server/ErrorAuditor.java index 9cf8d256..9f424290 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ErrorAuditor.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ErrorAuditor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatRecIdleStateHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatRecIdleStateHandler.java index 0c3c9479..74485de5 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatRecIdleStateHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatRecIdleStateHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatSentIdleStateHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatSentIdleStateHandler.java index ce90cbd9..aa4406ed 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatSentIdleStateHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/HeartbeatSentIdleStateHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/HttpNioChannelInitializer.java b/src/main/java/org/summerboot/jexpress/nio/server/HttpNioChannelInitializer.java index b18a3bdb..9663d5d2 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/HttpNioChannelInitializer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/HttpNioChannelInitializer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; @@ -30,6 +31,10 @@ import io.netty.handler.stream.ChunkedWriteHandler; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.summerboot.jexpress.nio.server.websocket.WebSocketAuthHandler_OTT; + +import java.util.ArrayList; +import java.util.List; /** * @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵 @@ -99,7 +104,7 @@ protected void initChannelPipeline(ChannelPipeline channelPipeline, NioConfig ni // 4. HTTP base: aggregator channelPipeline.addLast("http-aggregator", new HttpObjectAggregator(nioCfg.getHttpObjectAggregatorMaxContentLength()));// to merge multple messages into single request or response - // 5*. websocket + // 5. websocket if (namedWebsocket != null) { boolean isWebSocketCompress = nioCfg.isWebSocketCompress(); if (isWebSocketCompress) { @@ -112,17 +117,29 @@ protected void initChannelPipeline(ChannelPipeline channelPipeline, NioConfig ni boolean checkStartsWith = nioCfg.isWebSocketCheckStartsWith(); boolean dropPongFrames = nioCfg.isWebSocketDropPongFrames(); long handshakeTimeoutMillis = nioCfg.getWebSocketHandshakeTimeoutMs(); - boolean isWebSocketServerProtocolHandlerRequired = true; - for (String named : namedWebsocket) { + + // 1. 【核心第一步】加入动态路由认证处理器 + // 该处理器执行完毕后,会根据路径,动态往管道最后添加 ChatModuleHandler 或 GameModuleHandler + channelPipeline.addLast(WebSocketAuthHandler_OTT.CHANNEL_NAME, new WebSocketAuthHandler_OTT(injector, namedWebsocket)); + + // 2. 【核心第二步】添加官方协议处理器 + // 关键点:我们将路径设置为 null。设置为 null 意味着它不会主动去拦截并匹配固定 URL, + // 而是只要看到带有符合标准的 WebSocket Upgrade 请求头,它就会自动在原地执行握手升级! + // 这样无论我们前面把 URI 改成 /ws/chat 还是 /ws/game,它都能兼容升级。 + String webSocketURI = WebSocketAuthHandler_OTT.WS_PATH_PREFIX; + channelPipeline.addLast(WebSocketAuthHandler_OTT.CHANNEL_CHANNEL_NAME_NEXT, new WebSocketServerProtocolHandler(webSocketURI, null, allowExtensions, maxFrameSize, allowMaskMismatch, checkStartsWith, dropPongFrames, handshakeTimeoutMillis)); + + // 3. 注意:这里【不要】像之前一样 addLast(new BusinessHandler) 了。 + // 因为具体的业务 Handler 已经被 AuthHandler 在第一步动态注入到最末尾了。 + //channelPipeline.addLast(new ChatModuleHandler()); + List orderedNames = new ArrayList<>(namedWebsocket); + orderedNames.sort(String.CASE_INSENSITIVE_ORDER); + for (String named : orderedNames) { + if (true) break; ch = injector.getInstance(Key.get(ChannelHandler.class, Names.named(named))); if (ch != null) { - if (isWebSocketServerProtocolHandlerRequired) { - String webSocketURI = named; - String subprotocols = null; - channelPipeline.addLast(new WebSocketServerProtocolHandler(webSocketURI, subprotocols, allowExtensions, maxFrameSize, allowMaskMismatch, checkStartsWith, dropPongFrames, handshakeTimeoutMillis)); - isWebSocketServerProtocolHandlerRequired = false; - } channelPipeline.addLast("Websocket_" + named, ch); + //channelPipeline.addLast("Websocket_" + named, new ChatModuleHandler()); } } } @@ -140,9 +157,13 @@ protected void initChannelPipeline(ChannelPipeline channelPipeline, NioConfig ni // 7*. Tell the pipeline to run My Business Logic Handler's event handler methods in a different thread than an I/O thread, so that the I/O thread is not blocked by a time-consuming task. // If the business logic is fully asynchronous or finished very quickly, no need to specify a group. if (namedBusiness != null) { - for (String named : namedBusiness) { + List orderedNames = new ArrayList<>(namedBusiness); + orderedNames.sort(String.CASE_INSENSITIVE_ORDER); + for (String named : orderedNames) { ch = injector.getInstance(Key.get(ChannelHandler.class, Names.named(named))); - channelPipeline.addLast("Biz_" + named, ch); + if (ch != null) { + channelPipeline.addLast("Biz_" + named, ch); + } } } channelPipeline.addLast("Biz_jExpress", defaultHttpRequestHandler); diff --git a/src/main/java/org/summerboot/jexpress/nio/server/IoMultiplexer.java b/src/main/java/org/summerboot/jexpress/nio/server/IoMultiplexer.java index c6fab615..75e2d6a1 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/IoMultiplexer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/IoMultiplexer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioChannelInitializer.java b/src/main/java/org/summerboot/jexpress/nio/server/NioChannelInitializer.java index 1dca2b82..4c765a0c 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioChannelInitializer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioChannelInitializer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioConfig.java b/src/main/java/org/summerboot/jexpress/nio/server/NioConfig.java index 157ca41e..d3815e85 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioConfig.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; @@ -296,8 +297,8 @@ protected void generateTemplate_keystore(StringBuilder sb, Properties currentVal @Config(key = "nio.WebSocket.AllowMaskMismatch", defaultValue = "false") protected volatile boolean webSocketAllowMaskMismatch = false; - @Config(key = "nio.WebSocket.CheckStartsWith", defaultValue = "false") - protected volatile boolean webSocketCheckStartsWith = false; + @Config(key = "nio.WebSocket.CheckStartsWith", defaultValue = "true") + protected volatile boolean webSocketCheckStartsWith = true; @Config(key = "nio.WebSocket.DropPongFrames", defaultValue = "true") protected volatile boolean webSocketDropPongFrames = true; @Config(key = "nio.WebSocket.HandshakeTimeoutMs", defaultValue = "10000") diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioCounter.java b/src/main/java/org/summerboot/jexpress/nio/server/NioCounter.java index fe9befb4..31d08838 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioCounter.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioCounter.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioHttpUtil.java b/src/main/java/org/summerboot/jexpress/nio/server/NioHttpUtil.java index 2a7a1c4b..3081b3f9 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioHttpUtil.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioHttpUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; @@ -83,7 +84,7 @@ public class NioHttpUtil { protected static final Logger log = LogManager.getLogger(NioHttpUtil.class.getName()); //security - public static final String HTTP_HEADER_AUTH_TOKEN = "Authorization";// "X-Auth-Token";// "X_Authorization"; //RFC 7235, sec. 4.2 + public static final String HTTP_HEADER_AUTH_TOKEN = "Authorization";// "X-AuthToken";// "X_Authorization"; //RFC 7235, sec. 4.2 public static final String HTTP_HEADER_AUTH_TYPE = "Bearer";// RFC6750, https://tools.ietf.org/html/rfc6750 // protected static String HeaderName_ServerTimestamp = NioConfig.cfg.getHttpServiceResponseHeaderName_ServerTimestamp(); // protected static String HeaderName_Reference = NioConfig.cfg.getHttpServiceResponseHeaderName_Reference(); diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioServer.java b/src/main/java/org/summerboot/jexpress/nio/server/NioServer.java index 84b6aa6e..713f615b 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioServer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioServer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/NioServerHttpRequestHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/NioServerHttpRequestHandler.java index 809e352f..1ed5bbd2 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/NioServerHttpRequestHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/NioServerHttpRequestHandler.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/RequestProcessor.java b/src/main/java/org/summerboot/jexpress/nio/server/RequestProcessor.java index 07867235..aa42d32a 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/RequestProcessor.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/RequestProcessor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ResponseEncoder.java b/src/main/java/org/summerboot/jexpress/nio/server/ResponseEncoder.java index 7e608135..799e1707 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ResponseEncoder.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ResponseEncoder.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/SessionContext.java b/src/main/java/org/summerboot/jexpress/nio/server/SessionContext.java index 8c8f2679..a4f953e9 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/SessionContext.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/SessionContext.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/AdditionalJsonFields.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/AdditionalJsonFields.java index d413bc4f..1b48a941 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/AdditionalJsonFields.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/AdditionalJsonFields.java @@ -1,3 +1,20 @@ +/* + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project + * + * Licensed 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 + * + * https://apache.org + * + * 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.summerboot.jexpress.nio.server.domain; import com.fasterxml.jackson.annotation.JsonAnyGetter; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/CustomizedJsonField.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/CustomizedJsonField.java index 42b0a99e..aa0a2d05 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/CustomizedJsonField.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/CustomizedJsonField.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/Err.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/Err.java index 3d26e22e..bdf4f6f4 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/Err.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/Err.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeDeserializer.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeDeserializer.java index fd529873..aa21bd64 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeDeserializer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeDeserializer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeSerializer.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeSerializer.java index 27c80c14..9f922fde 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeSerializer.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ErrorCodeSerializer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/LoginVo.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/LoginVo.java index 3936587f..7976228d 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/LoginVo.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/LoginVo.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ProcessorSettings.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ProcessorSettings.java index be32deb1..2060bfef 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ProcessorSettings.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ProcessorSettings.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceError.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceError.java index 386af7df..d9734379 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceError.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceError.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceErrorConvertible.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceErrorConvertible.java index ba0aaf1a..b686a621 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceErrorConvertible.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceErrorConvertible.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceRequest.java b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceRequest.java index c58c1de4..fcfa8d2c 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceRequest.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/domain/ServiceRequest.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.domain; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/multipart/HttpPostBodyUtil.java b/src/main/java/org/summerboot/jexpress/nio/server/multipart/HttpPostBodyUtil.java index 7d74ba9b..68a9a806 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/multipart/HttpPostBodyUtil.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/multipart/HttpPostBodyUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.multipart; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/multipart/MultipartUtil.java b/src/main/java/org/summerboot/jexpress/nio/server/multipart/MultipartUtil.java index 2e5ce28b..0dc4fc25 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/multipart/MultipartUtil.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/multipart/MultipartUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.multipart; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/BootWebSocketHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/websocket/BootWebSocketHandler.java similarity index 64% rename from src/main/java/org/summerboot/jexpress/nio/server/BootWebSocketHandler.java rename to src/main/java/org/summerboot/jexpress/nio/server/websocket/BootWebSocketHandler.java index a3c493ee..7564e0cc 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/BootWebSocketHandler.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/websocket/BootWebSocketHandler.java @@ -1,19 +1,20 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server; +package org.summerboot.jexpress.nio.server.websocket; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; @@ -22,21 +23,18 @@ import io.netty.channel.SimpleChannelInboundHandler; import io.netty.channel.group.ChannelGroup; import io.netty.channel.group.DefaultChannelGroup; -import io.netty.handler.codec.http.HttpHeaderNames; -import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import io.netty.handler.codec.http.websocketx.ContinuationWebSocketFrame; import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import io.netty.handler.codec.http.websocketx.WebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; import io.netty.util.AttributeKey; import io.netty.util.concurrent.GlobalEventExecutor; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.summerboot.jexpress.nio.server.NioConfig; +import org.summerboot.jexpress.nio.server.NioHttpUtil; import org.summerboot.jexpress.security.auth.Caller; -import java.util.List; - /** * usage example: * @@ -67,12 +65,11 @@ abstract public class BootWebSocketHandler extends SimpleChannelInboundHandler { Caller caller = (Caller) ctx.channel().attr(KEY_CALLER).get(); if (caller == null) { - caller = auth(txt);//use the first message as token to auth + /*caller = auth(ctx.channel().attr(WebSocketAuthHandler_OTT.USER_ID_KEY).get());//use the first message as token to auth if (caller == null) { clients.remove(ctx.channel()); ctx.writeAndFlush(MSG_AUTH_FAILED.retainedDuplicate()); ctx.close(); - log.warn("Text auth failed " + ctx.channel().remoteAddress() + ": " + txt); + log.warn("OTT auth failed " + ctx.channel().remoteAddress() + ": " + txt); return; } ctx.channel().attr(KEY_CALLER).set(caller); String message = onCallerConnected(ctx, caller); if (message != null) { sendToAllChannels(message, true); - } - return; + }*/ } String responseText = onMessage(ctx, caller, txt); if (responseText != null) { - sendToChannel(ctx, responseText); + //sendToChannel(ctx, responseText); + sendToAllChannels(responseText, true); } }; NioConfig.cfg.getBizExecutor().execute(asyncTask); } - protected void channelRead0(ChannelHandlerContext ctx, ContinuationWebSocketFrame msg) throws Exception { + protected void onContinuationWebSocketFrame(ChannelHandlerContext ctx, ContinuationWebSocketFrame msg) throws Exception { } - abstract protected Caller auth(String token); + protected Caller auth(Caller caller) { + return caller; + } abstract protected String onCallerConnected(ChannelHandlerContext ctx, Caller caller); @@ -175,25 +173,25 @@ protected void channelRead0(ChannelHandlerContext ctx, ContinuationWebSocketFram abstract protected String onMessage(ChannelHandlerContext ctx, Caller caller, byte[] data); - public static void sendToChannel(ChannelHandlerContext ctx, String message) { + public void sendToChannel(ChannelHandlerContext ctx, String message) { ctx.writeAndFlush(new TextWebSocketFrame(message)); } - public static void sendToChannel(ChannelHandlerContext ctx, byte[] data) { + public void sendToChannel(ChannelHandlerContext ctx, byte[] data) { ctx.writeAndFlush(new BinaryWebSocketFrame(Unpooled.copiedBuffer(data))); } - public static void sendToAllChannels(String text, boolean auth) { + public void sendToAllChannels(String text, boolean auth) { TextWebSocketFrame message = new TextWebSocketFrame(text); sendToAllChannels(message, auth); } - public static void sendToAllChannels(byte[] data, boolean auth) { + public void sendToAllChannels(byte[] data, boolean auth) { BinaryWebSocketFrame message = new BinaryWebSocketFrame(Unpooled.copiedBuffer(data)); sendToAllChannels(message, auth); } - public static void sendToAllChannels(WebSocketFrame message, boolean auth) { + public void sendToAllChannels(WebSocketFrame message, boolean auth) { if (auth) { clients.stream() .filter(channel -> channel.attr(KEY_CALLER).get() != null) @@ -206,8 +204,30 @@ public static void sendToAllChannels(WebSocketFrame message, boolean auth) { @Override public void handlerAdded(ChannelHandlerContext ctx) { - clients.add(ctx.channel()); - log.trace(() -> "handlerAdded: " + ctx.channel().remoteAddress()); + Runnable asyncTask = () -> { + Caller caller = (Caller) ctx.channel().attr(KEY_CALLER).get(); + if (caller == null) { + caller = auth(ctx.channel().attr(WebSocketAuthHandler_OTT.USER_ID_KEY).get());//use the first message as token to auth + if (caller == null) { + clients.remove(ctx.channel()); + ctx.writeAndFlush(MSG_AUTH_FAILED.retainedDuplicate()); + ctx.close(); + log.warn("OTT " + ctx.channel().remoteAddress() + ": " + ctx); + ctx.close(); + return; + } + + ctx.channel().attr(KEY_CALLER).set(caller); + clients.add(ctx.channel()); + log.trace(() -> "handlerAdded: " + ctx.channel().remoteAddress()); + + String message = onCallerConnected(ctx, caller); + if (message != null) { + sendToAllChannels(message, true); + } + } + }; + NioConfig.cfg.getBizExecutor().execute(asyncTask); } @Override diff --git a/src/main/java/org/summerboot/jexpress/nio/server/websocket/ChatModuleHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/websocket/ChatModuleHandler.java new file mode 100644 index 00000000..7e6ca6fb --- /dev/null +++ b/src/main/java/org/summerboot/jexpress/nio/server/websocket/ChatModuleHandler.java @@ -0,0 +1,39 @@ +/* + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project + * + * Licensed 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 + * + * https://apache.org + * + * 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.summerboot.jexpress.nio.server.websocket; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import org.summerboot.jexpress.security.auth.Caller; + +public class ChatModuleHandler extends SimpleChannelInboundHandler { + + @Override + protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) throws Exception { + Caller caller = ctx.channel().attr(WebSocketAuthHandler_OTT.USER_ID_KEY).get(); + + if (frame instanceof TextWebSocketFrame) { + System.out.println("[聊天模块] 收到用户 " + caller.getDisplayName() + " 的文本: " + ((TextWebSocketFrame) frame).text()); + } else if (frame instanceof BinaryWebSocketFrame) { + System.out.println("[聊天模块] 收到用户 " + caller.getDisplayName() + " 的二进制数据流"); + } + } +} \ No newline at end of file diff --git a/src/main/java/org/summerboot/jexpress/nio/server/websocket/GameModuleHandler.java b/src/main/java/org/summerboot/jexpress/nio/server/websocket/GameModuleHandler.java new file mode 100644 index 00000000..efc0f4a8 --- /dev/null +++ b/src/main/java/org/summerboot/jexpress/nio/server/websocket/GameModuleHandler.java @@ -0,0 +1,38 @@ +/* + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project + * + * Licensed 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 + * + * https://apache.org + * + * 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.summerboot.jexpress.nio.server.websocket; + +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import org.summerboot.jexpress.security.auth.Caller; + +public class GameModuleHandler extends SimpleChannelInboundHandler { + @Override + protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) throws Exception { + Caller caller = ctx.channel().attr(WebSocketAuthHandler_OTT.USER_ID_KEY).get(); + + if (frame instanceof TextWebSocketFrame) { + System.out.println("[游戏模块] 收到用户 " + caller.getDisplayName() + " 的文本: " + ((TextWebSocketFrame) frame).text()); + } else if (frame instanceof BinaryWebSocketFrame) { + System.out.println("[游戏模块] 收到用户 " + caller.getDisplayName() + " 的二进制数据流"); + } + } +} diff --git a/src/main/java/org/summerboot/jexpress/nio/server/websocket/WebSocketAuthHandler_OTT.java b/src/main/java/org/summerboot/jexpress/nio/server/websocket/WebSocketAuthHandler_OTT.java new file mode 100644 index 00000000..a42f5517 --- /dev/null +++ b/src/main/java/org/summerboot/jexpress/nio/server/websocket/WebSocketAuthHandler_OTT.java @@ -0,0 +1,137 @@ +/* + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project + * + * Licensed 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 + * + * https://apache.org + * + * 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.summerboot.jexpress.nio.server.websocket; + +import com.google.inject.Injector; +import com.google.inject.Key; +import com.google.inject.name.Names; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.handler.codec.http.FullHttpRequest; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.HttpUtil; +import io.netty.util.AttributeKey; +import org.summerboot.jexpress.security.auth.Authenticator; +import org.summerboot.jexpress.security.auth.Caller; + +import java.util.Set; + +/** + * @author Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵 + */ +public class WebSocketAuthHandler_OTT extends ChannelInboundHandlerAdapter { + + public static final AttributeKey USER_ID_KEY = AttributeKey.valueOf("userId"); + public static final String CHANNEL_NAME = "WebSocketAuthHandler_OTT"; + public static final String CHANNEL_CHANNEL_NAME_NEXT = "BootWebSocketServerProtocolHandler"; + public static final String WS_PATH_PREFIX = "/ws"; + + + protected final Injector injector; + protected final Set namedWebsocket; + protected Authenticator authenticator; + + public WebSocketAuthHandler_OTT(Injector injector, Set namedWebsocket) { + this.injector = injector; + this.namedWebsocket = Set.copyOf(namedWebsocket); + this.authenticator = injector.getInstance(Authenticator.class); +// for (String s : namedWebsocket) { +// if (s == null || !s.startsWith(WS_PATH_PREFIX + "/")) { +// String errorMessage = "@Service(binding = ChannelHandler.class, named = \"" + s + "\", type = Service.ChannelHandlerType.Websocket): named field value must start with " + WS_PATH_PREFIX + "/, but found: " + s; +// throw new IllegalArgumentException(errorMessage); +// } +// String t = s.endsWith("/") ? s : s + "/"; +// this.namedWebsocket.add(t); +// } + } + + @Override + public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + if (msg instanceof FullHttpRequest) { + FullHttpRequest request = (FullHttpRequest) msg; + String uriRequested = request.uri(); + + // 路由分支一:如果是聊天模块的请求 + for (String uriPredefined : namedWebsocket) { + // uriPredefined = "/ws/chat/" + // uriRequested = "/ws/chat/oneTimeTicket" + String uriPredefinedOTT = uriPredefined.endsWith("/") ? uriPredefined : uriPredefined + "/"; + if (uriRequested.startsWith(uriPredefinedOTT)) { + String oneTimeTicket = uriRequested.substring(uriPredefinedOTT.length()); + Caller caller = verifyAndDestroyTicket(oneTimeTicket); // 校验并销毁 Ticket + if (caller == null) { + break; + } + // save OTT result to channel attr + ctx.channel().attr(USER_ID_KEY).set(caller); + + // 【核心点】动态向管道末尾添加聊天专属业务 Handler + //ctx.pipeline().addLast("businessHandler", new ChatModuleHandler()); + ChannelHandler ch = injector.getInstance(Key.get(ChannelHandler.class, Names.named(uriPredefined))); // "/ws/chat" + //ch = new ChatModuleHandler(); + ctx.pipeline().addAfter(CHANNEL_CHANNEL_NAME_NEXT, "ScannedWebSocketHandler", ch); + + // 重写 URI,让下游的 WebSocketServerProtocolHandler 能够精准匹配升级 + // derive baseUri without trailing slash for named lookup and rewrite + String baseUri = uriPredefined.endsWith("/") ? uriPredefined.substring(0, uriPredefined.length() - 1) : uriPredefined; + request.setUri(baseUri); // "/ws/chat" + ctx.fireChannelRead(msg); + return; + } + /*if (uriRequested.startsWith(CHAT_PATH_PREFIX)) { + String oneTimeTicket = uriRequested.substring(CHAT_PATH_PREFIX.length()); + Caller caller = verifyAndDestroyTicket(oneTimeTicket); // 校验并销毁 Ticket + + if (caller != null) { + ctx.channel().attr(USER_ID_KEY).set(caller); + + // 【核心点】动态向管道末尾添加聊天专属业务 Handler + //ctx.pipeline().addLast("businessHandler", new ChatModuleHandler()); + ChannelHandler ch = injector.getInstance(Key.get(ChannelHandler.class, Names.named("/ws/chat"))); + //ch = new ChatModuleHandler(); + ctx.pipeline().addAfter(CHANNEL_CHANNEL_NAME_NEXT, "wsChatModuleHandler", ch); + + // 重写 URI,让下游的 WebSocketServerProtocolHandler 能够精准匹配升级 + request.setUri("/ws/chat"); + ctx.fireChannelRead(msg); + return; + }*/ + } + + // 3. 认证失败或路径不匹配:直接拒绝连接 + /*sendHttpResponse(ctx, request, new DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, HttpResponseStatus.FORBIDDEN)); + return;*/ + } + + ctx.fireChannelRead(msg); + } + + private Caller verifyAndDestroyTicket(String oneTimeTicket) { + if (authenticator == null) { + return null; + } + return authenticator.oneTimeTicketVerifyAndDestroy(oneTimeTicket); + } + + private void sendHttpResponse(ChannelHandlerContext ctx, FullHttpRequest req, FullHttpResponse res) { + HttpUtil.setContentLength(res, 0); + ctx.channel().writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); + } +} \ No newline at end of file diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootController.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootController.java index 261f768d..42398cd1 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootController.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootController.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; @@ -41,6 +42,7 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.FormParam; import jakarta.ws.rs.GET; +import jakarta.ws.rs.HeaderParam; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; import jakarta.ws.rs.Path; @@ -56,6 +58,7 @@ import org.summerboot.jexpress.boot.annotation.RequiresHealthCheck; import org.summerboot.jexpress.boot.instrumentation.HealthMonitor; import org.summerboot.jexpress.integration.cache.AuthTokenCache; +import org.summerboot.jexpress.nio.server.NioHttpUtil; import org.summerboot.jexpress.nio.server.SessionContext; import org.summerboot.jexpress.nio.server.domain.Err; import org.summerboot.jexpress.nio.server.domain.LoginVo; @@ -63,6 +66,7 @@ import org.summerboot.jexpress.nio.server.domain.ServiceRequest; import org.summerboot.jexpress.security.auth.AuthConfig; import org.summerboot.jexpress.security.auth.Authenticator; +import org.summerboot.jexpress.security.auth.BootAuthenticator; import org.summerboot.jexpress.security.auth.Caller; import javax.naming.NamingException; @@ -264,6 +268,34 @@ public void logout(@Parameter(hidden = true) final ServiceRequest request, @Para context.status(HttpResponseStatus.NO_CONTENT); } + @Operation( + tags = {TAG_USER_AUTH}, + summary = "WebSocket One Time Ticket Authentication", + description = "Requires Bearer auth header", + responses = { + @ApiResponse(responseCode = "200", description = "success and return OTT", + headers = { + @Header(name = BootURI.X_AUTH_TOKEN, schema = @Schema(type = "string"), description = "Generated JWT") + }, + content = @Content(schema = @Schema(implementation = Caller.class)) + ), + @ApiResponse(responseCode = "4xx", description = DESC_4xx, + content = @Content(schema = @Schema(implementation = ServiceError.class)) + ), + @ApiResponse(responseCode = "5xx", description = DESC_5xx, + content = @Content(schema = @Schema(implementation = ServiceError.class)) + ) + } + ) + @GET + @Path(BootURI.CURRENT_VERSION + BootURI.API_NF_OTT) + @Daemon + @RequiresHealthCheck("") + public String oneTimeTicketAuthenticate(@HeaderParam(NioHttpUtil.HTTP_HEADER_AUTH_TOKEN) String authHeader, @Parameter(hidden = true) final SessionContext context) { + String jwt = BootAuthenticator.getBearerToken(authHeader); + return auth.oneTimeTicketAuthenticate(jwt, context); + } + @Operation( tags = {TAG_APP_ADMIN}, summary = "Check application version", diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootURI.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootURI.java index beb9c60c..e1e0e177 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootURI.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/BootURI.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; @@ -32,6 +33,7 @@ public interface BootURI { String LOAD_BALANCER_PING = "/ping"; String API_NF_JSECURITYCHECK = "/j_security_check"; String API_NF_LOGIN = "/login"; + String API_NF_OTT = "/ott"; String API_NF_LOADTEST = "/loadtest"; // Admin role based Non-Functional API diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/EnumConvert.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/EnumConvert.java index f560e426..9b3d7933 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/EnumConvert.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/EnumConvert.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestParameter.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestParameter.java index 4a131557..a3396ce8 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestParameter.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestParameter.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessor.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessor.java index 7be58303..765c3101 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessor.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessor.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessorManager.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessorManager.java index 7148dc12..96e5ae6c 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessorManager.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/JaxRsRequestProcessorManager.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaMatrixParam.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaMatrixParam.java index d67e68ba..805da4f8 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaMatrixParam.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaMatrixParam.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaPathParam.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaPathParam.java index 0840c7af..8e637202 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaPathParam.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/MetaPathParam.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/PingController.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/PingController.java index b2ea4a15..b176fea4 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/PingController.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/PingController.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/WebResourceController.java b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/WebResourceController.java index 224cdb2d..41133af2 100644 --- a/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/WebResourceController.java +++ b/src/main/java/org/summerboot/jexpress/nio/server/ws/rs/WebResourceController.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.nio.server.ws.rs; diff --git a/src/main/java/org/summerboot/jexpress/security/EncryptorUtil.java b/src/main/java/org/summerboot/jexpress/security/EncryptorUtil.java index 962f8559..2562a783 100644 --- a/src/main/java/org/summerboot/jexpress/security/EncryptorUtil.java +++ b/src/main/java/org/summerboot/jexpress/security/EncryptorUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; diff --git a/src/main/java/org/summerboot/jexpress/security/JwtUtil.java b/src/main/java/org/summerboot/jexpress/security/JwtUtil.java index 21d2f6c7..226b2497 100644 --- a/src/main/java/org/summerboot/jexpress/security/JwtUtil.java +++ b/src/main/java/org/summerboot/jexpress/security/JwtUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; diff --git a/src/main/java/org/summerboot/jexpress/security/SSLConnectionFactory.java b/src/main/java/org/summerboot/jexpress/security/SSLConnectionFactory.java index bac5e9bf..176559db 100644 --- a/src/main/java/org/summerboot/jexpress/security/SSLConnectionFactory.java +++ b/src/main/java/org/summerboot/jexpress/security/SSLConnectionFactory.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; diff --git a/src/main/java/org/summerboot/jexpress/security/SSLUtil.java b/src/main/java/org/summerboot/jexpress/security/SSLUtil.java index 81995d6f..3f646f44 100644 --- a/src/main/java/org/summerboot/jexpress/security/SSLUtil.java +++ b/src/main/java/org/summerboot/jexpress/security/SSLUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; diff --git a/src/main/java/org/summerboot/jexpress/security/SecurityUtil.java b/src/main/java/org/summerboot/jexpress/security/SecurityUtil.java index 6ac93ff5..ff16986d 100644 --- a/src/main/java/org/summerboot/jexpress/security/SecurityUtil.java +++ b/src/main/java/org/summerboot/jexpress/security/SecurityUtil.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; @@ -34,6 +35,7 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; import java.util.Arrays; import java.util.Map; import java.util.Set; @@ -57,6 +59,8 @@ public class SecurityUtil { public static final Pattern PATTERN_UNPRINTABLE = Pattern.compile("\\p{C}"); public static final Pattern PATTERN_UNPRINTABLE_CRLFTAB = Pattern.compile("\\p{C}&&[^\\r\\n\\t]"); + public static final SecureRandom RNG = new SecureRandom(); + public static final String DEFAULT_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789"; /** @@ -607,4 +611,29 @@ public static String whitelistbalcklistilter(String memo, String target, Set= 1"); + } + if (maxLen < minLen) { + throw new IllegalArgumentException("maxLen must be >= minLen"); + } + int len = minLen + RNG.nextInt(maxLen - minLen + 1); + return (prefix == null ? "" : prefix) + randomString(len); + } + + public static String randomString(int length) { + String alphabet = DEFAULT_ALPHABET; + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; i++) { + int idx = RNG.nextInt(alphabet.length()); + sb.append(alphabet.charAt(idx)); + } + return sb.toString(); + } } diff --git a/src/main/java/org/summerboot/jexpress/security/UrlSanitizer.java b/src/main/java/org/summerboot/jexpress/security/UrlSanitizer.java index 4ef663d1..da28f8a6 100644 --- a/src/main/java/org/summerboot/jexpress/security/UrlSanitizer.java +++ b/src/main/java/org/summerboot/jexpress/security/UrlSanitizer.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security; diff --git a/src/main/java/org/summerboot/jexpress/security/auth/AuthConfig.java b/src/main/java/org/summerboot/jexpress/security/auth/AuthConfig.java index 0087371d..d71d1a0a 100644 --- a/src/main/java/org/summerboot/jexpress/security/auth/AuthConfig.java +++ b/src/main/java/org/summerboot/jexpress/security/auth/AuthConfig.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security.auth; @@ -228,6 +229,9 @@ protected void generateTemplate_publicKeyFile(StringBuilder sb, Properties curre @Config(key = "jwt.filter.Blacklist", desc = "Whitelist in CSV format", format = "fixedvalue1, fixedvalue2, regex1, regex2", example = "abcd.1234.efg, .*1234.*") protected volatile Set jwtFilterBlacklist; + @Config(key = "OneTimeKey.ttl.seconds", defaultValue = "10", desc = "WebSocket One-Time Token TTL in seconds") + protected volatile int ottTtlSeconds; + //3. Role mapping @ConfigHeader(title = "3. Role mapping", desc = "Map the role (defined as @RolesAllowed({\"AppAdmin\"})) with user group (no matter the group is defined in LDAP or DB)", @@ -419,6 +423,10 @@ public Set getJwtFilterBlacklist() { return jwtFilterBlacklist; } + public int getOttTtlSeconds() { + return ottTtlSeconds; + } + public RoleMapping getRole(String role) { return roles.get(role); } diff --git a/src/main/java/org/summerboot/jexpress/security/auth/Authenticator.java b/src/main/java/org/summerboot/jexpress/security/auth/Authenticator.java index c7ba1388..fc874159 100644 --- a/src/main/java/org/summerboot/jexpress/security/auth/Authenticator.java +++ b/src/main/java/org/summerboot/jexpress/security/auth/Authenticator.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security.auth; @@ -129,4 +130,24 @@ public interface Authenticator { * @param context */ void logoutToken(String authToken, AuthTokenCache cache, final SessionContext context); + + + /** + * Generate a one-time ticket for WebSocket authentication, the ticket will be stored in Redis with a short TTL (e.g., 10 seconds) + * in production, generate a random string as one-time ticket, store it in redis with key "ws:ticket:" + oneTimeTicket, value = caller (or json string), + * and set expire time to 10 seconds. return the one-time ticket string to caller. + * + * @param jwt + * @param context contains caller info, e.g. caller.getUid() can be used to generate one-time ticket for specific user + * @return (32 to 64 chars + prefix) random string as one-time ticket, e.g. t_f87yfs7shfash7kk7a877asdf + */ + String oneTimeTicketAuthenticate(String jwt, SessionContext context); + + /** + * in production, call redis.getdel("ws:ticket:" + oneTimeTicket) + * + * @param oneTimeTicket + * @return + */ + Caller oneTimeTicketVerifyAndDestroy(String oneTimeTicket); } diff --git a/src/main/java/org/summerboot/jexpress/security/auth/AuthenticatorListener.java b/src/main/java/org/summerboot/jexpress/security/auth/AuthenticatorListener.java index 58548b05..c66760f8 100644 --- a/src/main/java/org/summerboot/jexpress/security/auth/AuthenticatorListener.java +++ b/src/main/java/org/summerboot/jexpress/security/auth/AuthenticatorListener.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security.auth; diff --git a/src/main/java/org/summerboot/jexpress/security/auth/BootAuthenticator.java b/src/main/java/org/summerboot/jexpress/security/auth/BootAuthenticator.java index 9534036c..12821fad 100644 --- a/src/main/java/org/summerboot/jexpress/security/auth/BootAuthenticator.java +++ b/src/main/java/org/summerboot/jexpress/security/auth/BootAuthenticator.java @@ -1,17 +1,18 @@ /* - * Copyright 2005-2022 Du Law Office - The Summer Boot Framework Project + * Copyright 2005-2026 Du Law Office - jExpress, The Summer Boot Framework Project * - * The Summer Boot Project 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 and you have no - * policy prohibiting employee contributions back to this file (unless the contributor to this - * file is your current or retired employee). You may obtain a copy of the License at: + * Licensed 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 * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://apache.org + * + * 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. * - * 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.summerboot.jexpress.security.auth; @@ -42,6 +43,7 @@ import org.summerboot.jexpress.nio.grpc.BearerAuthCredential; import org.summerboot.jexpress.nio.grpc.ContextualizedServerCallListenerEx; import org.summerboot.jexpress.nio.grpc.GRPCServerConfig; +import org.summerboot.jexpress.nio.server.NioHttpUtil; import org.summerboot.jexpress.nio.server.RequestProcessor; import org.summerboot.jexpress.nio.server.SessionContext; import org.summerboot.jexpress.nio.server.domain.Err; @@ -182,7 +184,7 @@ public JwtBuilder toJwt(Caller caller, String txId) { return builder; } - protected Claims parseJWT(String jwt) { + public static Claims parseJWT(String jwt) { JwtParser jwtParser = AuthConfig.cfg.getJwtParser(); if (jwtParser == null) { throw new UnsupportedOperationException(ERROR_NO_CFG); @@ -201,7 +203,7 @@ protected Claims parseJWT(String jwt) { * @param claims * @return Caller */ - protected Caller fromJwt(Claims claims) { + public static Caller fromJwt(Claims claims) { //String issuer = claims.getIssuer(); String userName = claims.getSubject(); Set audience = claims.getAudience(); @@ -286,7 +288,7 @@ public static boolean hasBearerToken(HttpHeaders httpRequestHeaders) { */ public static String getBearerToken(String authHeaderValue) { // return authHeaderValue.substring(BearerAuthCredential.BEARER_TYPE.length()).trim(); - if (StringUtils.isBlank(authHeaderValue) || !authHeaderValue.startsWith("Bearer ")) { + if (StringUtils.isBlank(authHeaderValue) || !authHeaderValue.startsWith(NioHttpUtil.HTTP_HEADER_AUTH_TYPE + " ")) { return null; } String[] a = authHeaderValue.split(" "); @@ -500,6 +502,26 @@ public ServerCall.Listener interceptCall(ServerCall + @@ -8,45 +25,50 @@ ${title}