diff options
author | Joey Grover <joeygrover@gmail.com> | 2019-03-13 09:51:23 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2019-03-13 09:51:23 -0400 |
commit | 058125005a39b8ca1cd13b2ee8c8a273cf531c00 (patch) | |
tree | d06b0cb985676c979382d8b858bfa841404631c7 /base | |
parent | be25d26b874ecb074e2ce70652de242fe773724c (diff) | |
download | sdl_android-058125005a39b8ca1cd13b2ee8c8a273cf531c00.tar.gz |
Refactor GenericTransport to CustomTransportfeature/java_ee
Diffstat (limited to 'base')
-rw-r--r-- | base/src/main/java/com/smartdevicelink/transport/CustomTransport.java (renamed from base/src/main/java/com/smartdevicelink/transport/GenericTransport.java) | 8 | ||||
-rw-r--r-- | base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java (renamed from base/src/main/java/com/smartdevicelink/transport/GenericTransportConfig.java) | 12 | ||||
-rw-r--r-- | base/src/main/java/com/smartdevicelink/transport/TransportManager.java | 4 | ||||
-rw-r--r-- | base/src/main/java/com/smartdevicelink/transport/enums/TransportType.java | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/base/src/main/java/com/smartdevicelink/transport/GenericTransport.java b/base/src/main/java/com/smartdevicelink/transport/CustomTransport.java index f0774dbbc..6e029d1b5 100644 --- a/base/src/main/java/com/smartdevicelink/transport/GenericTransport.java +++ b/base/src/main/java/com/smartdevicelink/transport/CustomTransport.java @@ -39,8 +39,8 @@ import com.smartdevicelink.util.DebugTool; import java.nio.ByteBuffer; -public abstract class GenericTransport implements TransportInterface{ - private static final String TAG = "GenericTransport"; +public abstract class CustomTransport implements TransportInterface{ + private static final String TAG = "CustomTransport"; final TransportRecord transportRecord; final SdlPsm psm; @@ -48,10 +48,10 @@ public abstract class GenericTransport implements TransportInterface{ - public GenericTransport (String address) { + public CustomTransport(String address) { //Creates a callback for when packets psm = new SdlPsm(); - transportRecord = new TransportRecord(TransportType.GENERIC,address); + transportRecord = new TransportRecord(TransportType.CUSTOM,address); } public TransportRecord getTransportRecord(){ diff --git a/base/src/main/java/com/smartdevicelink/transport/GenericTransportConfig.java b/base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java index 13cce7749..af0613aa1 100644 --- a/base/src/main/java/com/smartdevicelink/transport/GenericTransportConfig.java +++ b/base/src/main/java/com/smartdevicelink/transport/CustomTransportConfig.java @@ -34,20 +34,20 @@ package com.smartdevicelink.transport; import com.smartdevicelink.transport.enums.TransportType; -public class GenericTransportConfig extends BaseTransportConfig { +public class CustomTransportConfig extends BaseTransportConfig { - final GenericTransport genericTransport; + final CustomTransport customTransport; - public GenericTransportConfig(GenericTransport genericTransport){ - this.genericTransport = genericTransport; + public CustomTransportConfig(CustomTransport customTransport){ + this.customTransport = customTransport; } @Override public TransportType getTransportType() { - return TransportType.GENERIC; + return TransportType.CUSTOM; } public TransportInterface getTransportInterface(){ - return this.genericTransport; + return this.customTransport; } } diff --git a/base/src/main/java/com/smartdevicelink/transport/TransportManager.java b/base/src/main/java/com/smartdevicelink/transport/TransportManager.java index ed7a05d9f..aafaefe1b 100644 --- a/base/src/main/java/com/smartdevicelink/transport/TransportManager.java +++ b/base/src/main/java/com/smartdevicelink/transport/TransportManager.java @@ -63,8 +63,8 @@ public class TransportManager extends TransportManagerBase{ case WEB_SOCKET_SERVER: transport = new WebSocketServer2((WebSocketServerConfig)config, new SingleTransportCallbackImpl(new TransportRecord(TransportType.WEB_SOCKET_SERVER,"127.0.0.1:"+((WebSocketServerConfig)config).port))); break; - case GENERIC: - transport = ((GenericTransportConfig) config).getTransportInterface(); + case CUSTOM: + transport = ((CustomTransportConfig) config).getTransportInterface(); transport.setCallback(new SingleTransportCallbackImpl(transport.getTransportRecord())); break; } diff --git a/base/src/main/java/com/smartdevicelink/transport/enums/TransportType.java b/base/src/main/java/com/smartdevicelink/transport/enums/TransportType.java index 86b974c46..c3c68a82c 100644 --- a/base/src/main/java/com/smartdevicelink/transport/enums/TransportType.java +++ b/base/src/main/java/com/smartdevicelink/transport/enums/TransportType.java @@ -27,7 +27,7 @@ public enum TransportType { * This transport is setup to be essentially a proxy to a different transport. It allows a developer to create a
* custom transport without much effort.
*/
- GENERIC,
+ CUSTOM,
;
|