Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f33e963
commit ff7dc61
Showing
18 changed files
with
416 additions
and
90 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/server/Endpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
///* | ||
// * Copyright (c) 2022 the Eclipse Milo Authors | ||
// * | ||
// * This program and the accompanying materials are made | ||
// * available under the terms of the Eclipse Public License 2.0 | ||
// * which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
// * | ||
// * SPDX-License-Identifier: EPL-2.0 | ||
// */ | ||
// | ||
//package org.eclipse.milo.opcua.stack.transport.server; | ||
// | ||
//public interface Endpoint { | ||
//} |
78 changes: 39 additions & 39 deletions
78
...main/java/org/eclipse/milo/opcua/stack/transport/server/InboundServiceRequestHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import io.netty.channel.SimpleChannelInboundHandler; | ||
|
||
public abstract class InboundServiceRequestHandler | ||
extends SimpleChannelInboundHandler<ServiceRequest> implements ServiceRequestHandler { | ||
|
||
@Override | ||
protected void channelRead0(ChannelHandlerContext ctx, ServiceRequest serviceRequest) throws Exception { | ||
handleRequest(serviceRequest); | ||
} | ||
|
||
public static class DelegatingServiceRequestHandler extends InboundServiceRequestHandler { | ||
|
||
private final ServiceRequestHandler delegate; | ||
|
||
public DelegatingServiceRequestHandler(ServiceRequestHandler delegate) { | ||
this.delegate = delegate; | ||
} | ||
|
||
@Override | ||
public void handleRequest(ServiceRequest serviceRequest) { | ||
delegate.handleRequest(serviceRequest); | ||
} | ||
|
||
} | ||
|
||
} | ||
///* | ||
// * Copyright (c) 2022 the Eclipse Milo Authors | ||
// * | ||
// * This program and the accompanying materials are made | ||
// * available under the terms of the Eclipse Public License 2.0 | ||
// * which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
// * | ||
// * SPDX-License-Identifier: EPL-2.0 | ||
// */ | ||
// | ||
//package org.eclipse.milo.opcua.stack.transport.server; | ||
// | ||
//import io.netty.channel.ChannelHandlerContext; | ||
//import io.netty.channel.SimpleChannelInboundHandler; | ||
// | ||
//public abstract class InboundServiceRequestHandler | ||
// extends SimpleChannelInboundHandler<ServiceRequest> implements ServiceRequestHandler { | ||
// | ||
// @Override | ||
// protected void channelRead0(ChannelHandlerContext ctx, ServiceRequest serviceRequest) throws Exception { | ||
// handleRequest(serviceRequest); | ||
// } | ||
// | ||
// public static class DelegatingServiceRequestHandler extends InboundServiceRequestHandler { | ||
// | ||
// private final ServiceRequestHandler delegate; | ||
// | ||
// public DelegatingServiceRequestHandler(ServiceRequestHandler delegate) { | ||
// this.delegate = delegate; | ||
// } | ||
// | ||
// @Override | ||
// public void handleRequest(ServiceRequest serviceRequest) { | ||
// delegate.handleRequest(serviceRequest); | ||
// } | ||
// | ||
// } | ||
// | ||
//} |
22 changes: 22 additions & 0 deletions
22
...sport/src/main/java/org/eclipse/milo/opcua/stack/transport/server/OpcServerTransport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
public interface OpcServerTransport { | ||
|
||
void bind() throws Exception; | ||
|
||
void unbind() throws Exception; | ||
|
||
// TODO settable after transport is instantiated or part of config? | ||
void setServiceInterface(ServiceInterface serviceInterface); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...src/main/java/org/eclipse/milo/opcua/stack/transport/server/OpcServerTransportConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.milo.opcua.stack.core.channel.EncodingLimits; | ||
import org.eclipse.milo.opcua.stack.core.security.CertificateManager; | ||
import org.eclipse.milo.opcua.stack.core.security.CertificateValidator; | ||
import org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription; | ||
|
||
public interface OpcServerTransportConfig { | ||
|
||
List<EndpointDescription> getEndpointDescriptions(); | ||
|
||
CertificateManager getCertificateManager(); | ||
|
||
CertificateValidator getCertificateValidator(); | ||
|
||
EncodingLimits getEncodingLimits(); | ||
|
||
ServiceInterface getServiceInterface(); | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
...ansport/src/main/java/org/eclipse/milo/opcua/stack/transport/server/ServiceInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
import org.eclipse.milo.opcua.stack.core.types.UaRequestMessageType; | ||
import org.eclipse.milo.opcua.stack.core.types.UaResponseMessageType; | ||
|
||
public interface ServiceInterface { | ||
|
||
CompletableFuture<UaResponseMessageType> handleServiceRequest( | ||
ServiceRequestContext context, | ||
UaRequestMessageType requestMessage | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...rt/src/main/java/org/eclipse/milo/opcua/stack/transport/server/ServiceRequestContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
import java.net.InetAddress; | ||
|
||
import org.eclipse.milo.opcua.stack.core.channel.SecureChannel; | ||
|
||
public interface ServiceRequestContext { | ||
|
||
String getEndpointUrl(); | ||
|
||
SecureChannel getSecureChannel(); | ||
|
||
InetAddress getClientAddress(); | ||
|
||
Long receivedAtNanos(); | ||
|
||
} |
34 changes: 17 additions & 17 deletions
34
...rt/src/main/java/org/eclipse/milo/opcua/stack/transport/server/ServiceRequestHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
public interface ServiceRequestHandler { | ||
|
||
void handleRequest(ServiceRequest serviceRequest); | ||
|
||
} | ||
///* | ||
// * Copyright (c) 2022 the Eclipse Milo Authors | ||
// * | ||
// * This program and the accompanying materials are made | ||
// * available under the terms of the Eclipse Public License 2.0 | ||
// * which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
// * | ||
// * SPDX-License-Identifier: EPL-2.0 | ||
// */ | ||
// | ||
//package org.eclipse.milo.opcua.stack.transport.server; | ||
// | ||
//public interface ServiceRequestHandler { | ||
// | ||
// void handleRequest(ServiceRequest serviceRequest); | ||
// | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
opc-ua-stack/transport/src/main/java/org/eclipse/milo/opcua/stack/transport/server/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server; | ||
|
||
public class Test { | ||
|
||
public static void main(String[] args) { | ||
|
||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
...rc/main/java/org/eclipse/milo/opcua/stack/transport/server/tcp/OpcTcpServerTransport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2022 the Eclipse Milo Authors | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package org.eclipse.milo.opcua.stack.transport.server.tcp; | ||
|
||
import org.eclipse.milo.opcua.stack.transport.server.OpcServerTransport; | ||
import org.eclipse.milo.opcua.stack.transport.server.ServiceInterface; | ||
|
||
public class OpcTcpServerTransport implements OpcServerTransport { | ||
|
||
@Override | ||
public void bind() throws Exception { | ||
|
||
} | ||
|
||
@Override | ||
public void unbind() throws Exception { | ||
|
||
} | ||
|
||
@Override | ||
public void setServiceInterface(ServiceInterface serviceInterface) { | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.