-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/transport configuration rework #1179
Conversation
…lly support overwriting (WIP)
…plc4x-maven-plugin config.
…figurationFactory
… connection-string parameters.
…taching them from the protocol configuration.
...ivers/ab-eth/src/main/java/org/apache/plc4x/java/abeth/configuration/AbEthConfiguration.java
Show resolved
Hide resolved
plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/configuration/AdsConfiguration.java
Show resolved
Hide resolved
...us/src/main/java/org/apache/plc4x/java/cbus/configuration/CBusTcpTransportConfiguration.java
Outdated
Show resolved
Hide resolved
@@ -111,7 +112,7 @@ public Plc4xProtocolBase<BASE_PACKET_CLASS> configurePipeline(Configuration conf | |||
if (driverContextClass != null) { | |||
protocol.setDriverContext(configure(configuration, createInstance(driverContextClass))); | |||
} | |||
Plc4xNettyWrapper<BASE_PACKET_CLASS> context = new Plc4xNettyWrapper<>(configuration.getTimeoutManager(), pipeline, passive, protocol, | |||
Plc4xNettyWrapper<BASE_PACKET_CLASS> context = new Plc4xNettyWrapper<>(new NettyHashTimerTimeoutManager(), pipeline, passive, protocol, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above: why is this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was simply me cleaning up something that I thought didn't belong into the configuration.
@@ -28,4 +28,8 @@ public interface Transport { | |||
|
|||
ChannelFactory createChannelFactory(String transportConfig); | |||
|
|||
default Class<? extends TransportConfiguration> getTransportConfigType() { | |||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could also consider the use of optional, depending on how it is use (not a issue with null)
|
||
public interface TransportConfigurationTypeProvider { | ||
|
||
Class<? extends TransportConfiguration> getTransportConfigurationType(String transportCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see optional comment above
plc4j/spi/src/test/java/org/apache/plc4x/java/spi/configuration/ConfigurationFactoryTest.java
Show resolved
Hide resolved
...ap-shared/src/main/java/org/apache/plc4x/java/transport/pcap/PcapTransportConfiguration.java
Show resolved
Hide resolved
LGTM |
…configuration-rework # Conflicts: # plc4j/drivers/modbus/pom.xml
Reworked the configuration of transports so a transports configuration options are referenced by a prefix, that matches the transport code.
So for example in S7 I can customize the timeout like this: