-Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces
-
-
Search
-
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
-
-
j.l.obj will match "java.lang.Object"
-
InpStr will match "java.io.InputStream"
-
HM.cK will match "java.util.HashMap.containsKey(Object)"
-The following sections describe the different kinds of pages in this collection.
-
-
Overview
-
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-
-
-
Package
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
-
-
Interfaces
-
Classes
-
Enum Classes
-
Exceptions
-
Errors
-
Annotation Interfaces
-
-
-
-
Class or Interface
-
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
-
-
Class Inheritance Diagram
-
Direct Subclasses
-
All Known Subinterfaces
-
All Known Implementing Classes
-
Class or Interface Declaration
-
Class or Interface Description
-
-
-
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
-
Property Summary
-
Constructor Summary
-
Method Summary
-
Required Element Summary
-
Optional Element Summary
-
-
-
-
Enum Constant Details
-
Field Details
-
Property Details
-
Constructor Details
-
Method Details
-
Element Details
-
-
Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
-
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-
-
-
Other Files
-
Packages and modules may contain pages with additional information related to the declarations nearby.
-
-
-
Use
-
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
-
-
-
Tree (Class Hierarchy)
-
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
-
-
When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
-
When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
-
-
-
-
Deprecated API
-
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-
-
-
All Packages
-
The All Packages page contains an alphabetic index of all packages contained in the documentation.
-
-
-
All Classes and Interfaces
-
The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
-
-
-
Index
-
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
-
-
-
-This help file applies to API documentation generated by the standard doclet.
-
Function used for receiving Packet objects and determining whether
- to route them to a connected Router or to process them through the
- process(Packet) function.
-
-
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css b/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css
deleted file mode 100644
index 1abff952..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/jquery-ui.overrides.css
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-.ui-state-active,
-.ui-widget-content .ui-state-active,
-.ui-widget-header .ui-state-active,
-a.ui-button:active,
-.ui-button:active,
-.ui-button.ui-state-active:hover {
- /* Overrides the color of selection used in jQuery UI */
- background: #F8981D;
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT
deleted file mode 100644
index ca74fffd..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/COPYRIGHT
+++ /dev/null
@@ -1 +0,0 @@
-Please see ..\java.base\COPYRIGHT
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE
deleted file mode 100644
index 4ad9fe40..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/LICENSE
+++ /dev/null
@@ -1 +0,0 @@
-Please see ..\java.base\LICENSE
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md
deleted file mode 100644
index 8054a34c..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jquery.md
+++ /dev/null
@@ -1,72 +0,0 @@
-## jQuery v3.5.1
-
-### jQuery License
-```
-jQuery v 3.5.1
-Copyright JS Foundation and other contributors, https://js.foundation/
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-******************************************
-
-The jQuery JavaScript Library v3.5.1 also includes Sizzle.js
-
-Sizzle.js includes the following license:
-
-Copyright JS Foundation and other contributors, https://js.foundation/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/sizzle
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-All files located in the node_modules and external directories are
-externally maintained libraries used by this software which have their
-own licenses; we recommend you read them, as their terms may differ from
-the terms above.
-
-*********************
-
-```
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md b/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md
deleted file mode 100644
index 8031bdb5..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/legal/jqueryUI.md
+++ /dev/null
@@ -1,49 +0,0 @@
-## jQuery UI v1.12.1
-
-### jQuery UI License
-```
-Copyright jQuery Foundation and other contributors, https://jquery.org/
-
-This software consists of voluntary contributions made by many
-individuals. For exact contribution history, see the revision history
-available at https://github.com/jquery/jquery-ui
-
-The following license applies to all parts of this software except as
-documented below:
-
-====
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-====
-
-Copyright and related rights for sample code are waived via CC0. Sample
-code is defined as all source code contained within the demos directory.
-
-CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
-====
-
-All files located in the node_modules and external directories are
-externally maintained libraries used by this software which have their
-own licenses; we recommend you read them, as their terms may differ from
-the terms above.
-
-```
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js
deleted file mode 100644
index 728b1ddc..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/member-search-index.js
+++ /dev/null
@@ -1 +0,0 @@
-memberSearchIndex = [{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"active"},{"p":"org.framework.router","c":"Router","l":"addProcess(String, Method)","u":"addProcess(java.lang.String,java.lang.reflect.Method)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"addRequestType(String)","u":"addRequestType(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"addRequestType(String)","u":"addRequestType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"addStream(String, String)","u":"addStream(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"addStream(String, String)","u":"addStream(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"addSubscriptionType(String)","u":"addSubscriptionType(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"AmberDataConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"authorize()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"authorize()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"authorize()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"authorize()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"authorized"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"authorizeStream(String)","u":"authorizeStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"authorizeStream(String)","u":"authorizeStream(java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"code"},{"p":"org.framework.router","c":"Response","l":"code()"},{"p":"org.framework.router","c":"Manager","l":"connect(Router)","u":"connect(org.framework.router.Router)"},{"p":"org.framework.router","c":"Router","l":"connect(Router...)","u":"connect(org.framework.router.Router...)"},{"p":"org.framework.router","c":"Manager","l":"connected()"},{"p":"org.framework.router","c":"Router","l":"connectedTags()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"containsRequestType(String)","u":"containsRequestType(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"containsRequestType(String)","u":"containsRequestType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsRequestType(String, String)","u":"containsRequestType(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsRequestType(String, String)","u":"containsRequestType(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsStream(String)","u":"containsStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsStream(String)","u":"containsStream(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"containsSubscriptionType(String)","u":"containsSubscriptionType(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsSubscriptionType(String, String)","u":"containsSubscriptionType(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"containsTemplate(String)","u":"containsTemplate(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"containsTemplate(String)","u":"containsTemplate(java.lang.String)"},{"p":"org.out.controller","c":"Controller","l":"Controller()","u":"%3Cinit%3E()"},{"p":"org.core.core","c":"Core","l":"Core()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Response","l":"create(int, String)","u":"create(int,java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"create(int, String, String)","u":"create(int,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Manager","l":"create(Router)","u":"create(org.framework.router.Router)"},{"p":"org.framework.router","c":"Packet","l":"data"},{"p":"org.framework.router","c":"Response","l":"data"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"data"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"data"},{"p":"org.framework.router","c":"Response","l":"data()"},{"p":"org.framework.router","c":"Router","l":"defineProcesses()"},{"p":"org.out.handler","c":"OutputHandler","l":"defineProcesses()"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"defineProcesses()"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"defineProcesses()"},{"p":"test.framework.router","c":"Router1","l":"defineProcesses()"},{"p":"test.framework.router","c":"Router2","l":"defineProcesses()"},{"p":"test.framework.router","c":"RouterTemp","l":"defineProcesses()"},{"p":"test.framework.router","c":"RouterTemplate","l":"defineProcesses()"},{"p":"test.framework.router","c":"TestPacketRouter","l":"defineProcesses()"},{"p":"test.speed","c":"RouterTemplate","l":"defineProcesses()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"defineRequestTypes()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"defineRequestTypes()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"defineSubscriptionTypes()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"defineSubscriptionTypes()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"defineSubscriptionTypes()"},{"p":"org.framework.router","c":"Manager","l":"disconnect(Router)","u":"disconnect(org.framework.router.Router)"},{"p":"org.core.engine","c":"Engine","l":"Engine()","u":"%3Cinit%3E()"},{"p":"org.core.logger","c":"LogSeverity","l":"ERROR"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"executeStream(String)","u":"executeStream(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"ExternalStreamConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"ExternalStreamHandler()","u":"%3Cinit%3E()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"ExternalStreamManager(ExternalStreamHandler)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamHandler)"},{"p":"org.framework.router","c":"Packet","l":"getData()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"getHash()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"getHash()"},{"p":"org.framework.interfaces","c":"Hash","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"getHash(String)","u":"getHash(java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"getManager()"},{"p":"org.framework.router","c":"Packet","l":"getSender()"},{"p":"org.framework.router","c":"Packet","l":"getSubTag()"},{"p":"org.core.logger","c":"LogSeverity","l":"getTag()"},{"p":"org.framework.router","c":"Packet","l":"getTag()"},{"p":"org.framework.router","c":"Router","l":"getTag()"},{"p":"org.framework.interfaces","c":"UUID","l":"getUUID()"},{"p":"org.framework.router","c":"Manager","l":"getUUID()"},{"p":"org.framework.router","c":"Router","l":"getUUID()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"getUUID()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"getUUID()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"handler"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"handler"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"hash"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"hash"},{"p":"org.core.logger","c":"LogSeverity","l":"INFO"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"init()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"init()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isActive()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isActive()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isActive()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isAuthorized()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isAuthorized()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isAuthorized()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"isAuthorized()"},{"p":"org.framework.router","c":"Router","l":"isConnected(Router)","u":"isConnected(org.framework.router.Router)"},{"p":"org.framework.router","c":"Manager","l":"isConnected(String)","u":"isConnected(java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"isConnected(String)","u":"isConnected(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"isReady()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"isReady()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"isReady()"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"isReady()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamActive(String)","u":"isStreamActive(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamAuthorized(String)","u":"isStreamAuthorized(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"isStreamAuthorized(String)","u":"isStreamAuthorized(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"isStreamReady(String)","u":"isStreamReady(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"isStreamReady(String)","u":"isStreamReady(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"killStream(String)","u":"killStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"LocalStreamConnection(LocalStreamManager, String)","u":"%3Cinit%3E(org.stream.local.handler.LocalStreamManager,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamHandler","l":"LocalStreamHandler()","u":"%3Cinit%3E()"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"LocalStreamManager(LocalStreamHandler)","u":"%3Cinit%3E(org.stream.local.handler.LocalStreamHandler)"},{"p":"org.core.logger","c":"Logger","l":"Logger()","u":"%3Cinit%3E()"},{"p":"org.core.logger","c":"LogSeverity","l":"LogSeverity(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.main","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"org.main","c":"Main","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"test.speed","c":"TestRouterSendSpeed","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"org.framework.router","c":"Router","l":"manager"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"manager"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"manager"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"manager"},{"p":"org.framework.router","c":"Manager","l":"Manager()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Response","l":"message"},{"p":"org.framework.router","c":"Response","l":"message()"},{"p":"test.framework.router","c":"RouterTemplate","l":"num"},{"p":"test.speed","c":"RouterTemplate","l":"num"},{"p":"org.out.handler","c":"OutputHandler","l":"OutputHandler()","u":"%3Cinit%3E()"},{"p":"org.out.handler","c":"OutputLiveConnection","l":"OutputLiveConnection()","u":"%3Cinit%3E()"},{"p":"org.out.handler","c":"OutputStaticConnection","l":"OutputStaticConnection()","u":"%3Cinit%3E()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"override"},{"p":"org.framework.router","c":"Packet","l":"packet(Router, String, String, String)","u":"packet(org.framework.router.Router,java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Packet","l":"Packet(Router, String, String, String)","u":"%3Cinit%3E(org.framework.router.Router,java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"process(Packet)","u":"process(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"process(String, String)","u":"process(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"process(String, String)","u":"process(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"process(String, String, String)","u":"process(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"process(String, String, String)","u":"process(java.lang.String,java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"Router1","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"Router2","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"RouterTemp","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"RouterTemplate","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.framework.router","c":"TestPacketRouter","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"test.speed","c":"RouterTemplate","l":"process1(Packet)","u":"process1(org.framework.router.Packet)"},{"p":"org.out.handler","c":"OutputHandler","l":"processEDAT(Packet)","u":"processEDAT(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEDAT(Packet)","u":"processEDAT(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"processes"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXEC(Packet)","u":"processEXEC(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXEC(Packet)","u":"processEXEC(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXSR(Packet)","u":"processEXSR(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXSR(Packet)","u":"processEXSR(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processEXST(Packet)","u":"processEXST(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processEXST(Packet)","u":"processEXST(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processIATH(Packet)","u":"processIATH(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processIATH(Packet)","u":"processIATH(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processIATV(Packet)","u":"processIATV(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processIATV(Packet)","u":"processIATV(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processINIT(Packet)","u":"processINIT(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processINIT(Packet)","u":"processINIT(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processKILL(Packet)","u":"processKILL(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processKILL(Packet)","u":"processKILL(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processRQST(Packet)","u":"processRQST(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processRQST(Packet)","u":"processRQST(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamHandler","l":"processSUBS(Packet)","u":"processSUBS(org.framework.router.Packet)"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"processSUBS(Packet)","u":"processSUBS(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"receive(Packet)","u":"receive(org.framework.router.Packet)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"reflect()"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"reflect()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"removeStream(String)","u":"removeStream(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"removeStream(String)","u":"removeStream(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"request(String)","u":"request(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"request(String, String)","u":"request(java.lang.String,java.lang.String)"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"request(String, String)","u":"request(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"requestTypes"},{"p":"org.stream.local.handler","c":"LocalStreamConnection","l":"requestTypes"},{"p":"org.framework.router","c":"Response","l":"Response(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"org.framework.router","c":"Response","l":"Response(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response0()"},{"p":"org.framework.router","c":"ResponseFactory","l":"response400(String)","u":"response400(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response404(String, String)","u":"response404(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response405(String, String)","u":"response405(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response410(String, String)","u":"response410(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response420(String)","u":"response420(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response421(String)","u":"response421(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response422(String)","u":"response422(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response423(String)","u":"response423(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response424(String)","u":"response424(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response425(String)","u":"response425(java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response426(String, String)","u":"response426(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response427(String, String, String)","u":"response427(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response428(String, String)","u":"response428(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response429(String, String, String)","u":"response429(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"response500(String, String)","u":"response500(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"ResponseFactory","l":"ResponseFactory()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Router","l":"Router(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Router","l":"Router(String, String, Manager)","u":"%3Cinit%3E(java.lang.String,java.lang.String,org.framework.router.Manager)"},{"p":"test.framework.router","c":"Router1","l":"Router1()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"Router2","l":"Router2()","u":"%3Cinit%3E()"},{"p":"org.framework.router","c":"Manager","l":"routers"},{"p":"test.framework.router","c":"RouterTemp","l":"RouterTemp(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"RouterTemplate","l":"RouterTemplate(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"test.speed","c":"RouterTemplate","l":"RouterTemplate(int, String, String)","u":"%3Cinit%3E(int,java.lang.String,java.lang.String)"},{"p":"test.framework.router","c":"RouterTemplate","l":"RouterTemplate(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"test.speed","c":"RouterTemplate","l":"RouterTemplate(String, String)","u":"%3Cinit%3E(java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Manager","l":"send(Packet)","u":"send(org.framework.router.Packet)"},{"p":"org.framework.router","c":"Router","l":"send(String, String, String)","u":"send(java.lang.String,java.lang.String,java.lang.String)"},{"p":"org.framework.router","c":"Packet","l":"sender"},{"p":"org.framework.router","c":"Router","l":"setManager(Manager)","u":"setManager(org.framework.router.Manager)"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"start()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"start()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"start()"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"stop()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"stop()"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"stop()"},{"p":"org.stream.registry","c":"StreamAuthorization","l":"StreamAuthorization()","u":"%3Cinit%3E()"},{"p":"org.stream.manager","c":"StreamManager","l":"StreamManager()","u":"%3Cinit%3E()"},{"p":"org.stream.registry","c":"StreamRegistryController","l":"StreamRegistryController()","u":"%3Cinit%3E()"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"streams"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"streams"},{"p":"org.framework.router","c":"Packet","l":"sub_tag"},{"p":"org.stream.external.connected.connections","c":"AmberDataConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"subscribe(String)","u":"subscribe(java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"subscribe(String, String)","u":"subscribe(java.lang.String,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamConnection","l":"subscriptionTypes"},{"p":"org.core.logger","c":"LogSeverity","l":"tag"},{"p":"org.framework.router","c":"Packet","l":"tag"},{"p":"org.framework.router","c":"Router","l":"tag"},{"p":"org.framework.router","c":"Manager","l":"tags()"},{"p":"org.stream.local.connected.connections","c":"TemplateConnection","l":"TemplateConnection()","u":"%3Cinit%3E()"},{"p":"org.stream.external.connected.connections","c":"TemplateConnection","l":"TemplateConnection(ExternalStreamManager, String)","u":"%3Cinit%3E(org.stream.external.handler.ExternalStreamManager,java.lang.String)"},{"p":"org.stream.external.handler","c":"ExternalStreamManager","l":"templates"},{"p":"org.stream.local.handler","c":"LocalStreamManager","l":"templates"},{"p":"test.framework.router","c":"TestRouter","l":"TestCentralRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestComplexRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestComplexRouterSend()"},{"p":"test.framework.router","c":"TestManager","l":"TestConnection()"},{"p":"test.framework.router","c":"TestPacket","l":"TestCreatePacket()"},{"p":"test.protocols","c":"TestESH","l":"TestESH()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestESH","l":"TestEXEC()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXEC()"},{"p":"test.framework.router","c":"TestManager","l":"TestExistingConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestExistingConnection()"},{"p":"test.protocols","c":"TestESH","l":"TestEXSR()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXSR()"},{"p":"test.protocols","c":"TestESH","l":"TestEXST()"},{"p":"test.protocols","c":"TestSRC","l":"TestEXST()"},{"p":"test.protocols","c":"TestESH","l":"TestIATH()"},{"p":"test.protocols","c":"TestSRC","l":"TestIATH()"},{"p":"test.protocols","c":"TestESH","l":"TestIATV()"},{"p":"test.protocols","c":"TestSRC","l":"TestIATV()"},{"p":"test.protocols","c":"TestESH","l":"TestINIT()"},{"p":"test.protocols","c":"TestSRC","l":"TestINIT()"},{"p":"test.protocols","c":"TestESH","l":"TestKILL()"},{"p":"test.protocols","c":"TestSRC","l":"TestKILL()"},{"p":"test.framework.router","c":"TestManager","l":"TestManager()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestPacket","l":"TestPacket()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestPacketRouter","l":"TestPacketRouter()","u":"%3Cinit%3E()"},{"p":"test.framework.router","c":"TestRouter","l":"TestRouter()","u":"%3Cinit%3E()"},{"p":"test.speed","c":"TestRouterSendSpeed","l":"TestRouterSendSpeed()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestSRC","l":"TestRQST()"},{"p":"test.framework.router","c":"TestManager","l":"TestSends()"},{"p":"test.framework.router","c":"TestRouter","l":"TestSimpleRouterConnection()"},{"p":"test.framework.router","c":"TestRouter","l":"TestSimpleRouterSendPacket()"},{"p":"test.protocols","c":"TestSRC","l":"TestSRC()","u":"%3Cinit%3E()"},{"p":"test.protocols","c":"TestSRC","l":"TestSUBS()"},{"p":"org.framework.router","c":"Manager","l":"toString()"},{"p":"org.framework.router","c":"Manager","l":"uuid"},{"p":"org.framework.router","c":"Router","l":"uuid"},{"p":"org.core.logger","c":"LogSeverity","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"org.core.logger","c":"LogSeverity","l":"values()"},{"p":"org.core.logger","c":"LogSeverity","l":"WARNING"}];updateSearchResults();
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js
deleted file mode 100644
index 0d59754f..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/module-search-index.js
+++ /dev/null
@@ -1 +0,0 @@
-moduleSearchIndex = [];updateSearchResults();
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html b/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html
deleted file mode 100644
index 75b13658..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/org/core/core/Core.html
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-Core
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
LogSeverity is a enum class used by all processes that interact
- with the Logger class. There are several values which are used
- to determine the severity of the message passed to the Logger.
-
- INFO: General information regarding the system.
- WARNING: Warnings about system inconsistencies.
- ERROR: Errors that cause system failure.
-
-
Author:
-
Conor Flynn
-
-
-
-
-
-
-
-
Nested Class Summary
-
-
Nested classes/interfaces inherited from class java.lang.Enum
Returns the enum constant of this class with the specified name.
-The string must match exactly an identifier used to declare an
-enum constant in this class. (Extraneous whitespace characters are
-not permitted.)
-
-
Parameters:
-
name - the name of the enum constant to be returned.
Interface used for requiring components to have a unique hash based on the passed data.
- The hash does not require any standard formatting so long as it is unique.
-
- The standard algorithm that will be used is a salted SHA-512.
The UUID interface is used for requiring reflected classes to have a unique id that
- they can be referenced by.
-
- Standard syntax for a UUID is all lower case, no numbers, and words being separated
- by _.
The Manager class is used to handle all Router connections.
- Manager objects have the ability to merge and combine networks of
- Router objects efficiently and effectively.
Sends a Packet object between two Router objects stored in the network. Sent
- packets are required to return a Response to the sender that determines the result
- of the sent Packet.
Static function used to create a new Manager object. Called by a Router
- object when necessary. Automatically connects the passed Router to the Manager
- upon initialization.
-
-
Parameters:
-
router - Router object that creates the Manager and then automatically connects to it.
-
Returns:
-
New Manager object with the parameterized router object connected.
The Packet class represents a standardized data transfer object
- used throughout the engine. It contains a series of values which help to
- route it to different processes. This class interacts heavily with the
- Router class.
The Response class is used to relay information from a
- given Packet sent through a Router. Response
- objects contain two fields: code and message.
-
- The code refers to the response code listed in the documentation, which
- can be used to determine certain interactions the sent Packet may
- have had.
-
- The message refers to the message sent with the response code, which may
- contain more detailed information of the response. This value may be left
- blank based on the response code as some codes do not need any more information
- than what is provided.
message - Message to be sent to accompany the response code.
-
data - String of data to be returned in the response.
-
-
-
-
-
-
-
-
-
-
Method Details
-
-
-
-
code
-
publicintcode()
-
Response code of the Response object. Gives high level overview of the
- sent Packet object's response.
-
- See documentation for more detailed explanation of all response codes.
-
-
Returns:
-
Integer value representing response from Packet submission.
Response message which is used for containing more detailed information about the
- response code if necessary. This field may be left blank if not needed.
The Router is a super class that every process inherits. It is used to route data in a
- standardized manner throughout the engine. Each process that inherits the Router super class
- will be required to supply several types of information. See documentation for further
- details.
Function used for receiving Packet objects and determining whether
- to route them to a connected Router or to process them through the
- process(Packet) function.
Connects all passed Router objects to this Router object's Manager.
- Merges all Router objects within both networks such that they can all communicate with
- each other.
-
- Creates a new Manager object for this Router if it is null.
-
-
Parameters:
-
routers - Router objects to connect to this Router object's network.
Determines if a Router object exists on the network. Uses
- the passed Router object's tag to determine existence and references
- isConnected(String).
Function used for receiving Packet objects and determining whether
- to route them to a connected Router or to process them through the
- process(Packet) function.
Integer representing the return code of the sent Packet.
-
-
-
-
-
-
addProcess
-
public finalvoidaddProcess(String subtag,
- Method method)
-
Adds a process to the Router object under the given subtag.
- When the Router object receives a Packet with the given
- subtag, it will auto route the Packet to the stored method.
-
- All Method objects must contain a single parameter, a Packet object,
- and return a Response object.
-
-
Parameters:
-
subtag - Subtag of the process to handle the incoming Packet object.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Function used for receiving Packet objects and determining whether
- to route them to a connected Router or to process them through the
- Router.process(Packet) function.
Function used for receiving Packet objects and determining whether
- to route them to a connected Router or to process them through the
- Router.process(Packet) function.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
public class ExternalStreamManager
-extends Object
-
The ExternalStreamManager is a class which handles all
- external stream connections and requests. This class contains
- the functionality to reflect all ExternalStreamConnection
- templates stored in org.stream.external.connected.connections
- and create streams based on their parameters.
-
- All subprocesses sent to the ExternalStreamHandler interact with this
- class and are documented as such. All Response objects are created
- in the ExternalStreamHandler, as this class returns objects that can
- be interpreted into responses. Please view ExternalStreamHandler for
- more information regarding the processes.
Creates a new ExternalStreamManager object. Initializes the required
- variables and reflects all classes stored in
- org.stream.external.connected.connections. This constructor is called from
- the ExternalStreamHandler and should not be initialized from any other point.
Private function which utilizes the org.reflections library to reflect
- all classes stored in org.stream.external.connected.connections.
-
- All thrown exceptions are from the reflections library. For more documentation please
- go to the following link: https://github.com/ronmamo/reflections
Determines if a stream with the given hash exists in the manager. Hashes
- are generated on initialization and should be stored for future stream references.
Determines if a stream with the given hash has been successfully authorized.
-
- If a stream with the given hash does not exist, the function returns false.
Determines if a stream with the given hash is ready for deployment or a static request.
-
- If a stream with the given hash does not exist, the function returns false.
Determines if a stream with the given hash is currently active. Active streams have been successfully
- executed through the ExternalStreamConnection.start() function.
-
- If a stream with the given hash does not exist, the function returns false.
Adds a new stream of the given type to the manager. New streams types are generated from the
- reflection of org.stream.external.connected.connections package. The type parameter
- refers to the return of the UUID.getUUID() function.
-
- After initialization, the manager will attempt to authorize the stream using the data passed in the
- data parameter. If failed, the method will return false.
-
-
Parameters:
-
type - Type of the stream the user wants to initialize. See UUID.getUUID() for more information.
-
data - Data of the stream used for the authorization of the stream and for the random generation of
- ExternalStreamConnection.getHash(). Data should be formatted exactly as specified in the documentation otherwise the
- stream will be unable to authorize.
-
Returns:
-
The function returns an Object array containing 2 objects. The first is a Boolean that determines if
- the action was successful. The second object will return a String which contains the generated hash of the new stream.
- If the initialization is unsuccessful, the second object will be null.
Removes a stream with the given has from the manager. This function is currently deprecated and not used
- however future implementations will include usage for it.
Determines if a stream with the given hash contains the given subscription type.
- Utilizes the ExternalStreamConnection.containsSubscriptionType(String) for
- determining if the subscription exists.
-
- If a stream with the given hash does not exist, this function returns false.
Subscribes the stream to the given subscription type passed in the data
- parameter. Subscriptions are live data feeds that push to the output handler
- class. From there they are distributed to the according external sources.
-
- If a stream with the given hash does not exist, this function returns false.
data - Data required for processing the new subscription.
-
Returns:
-
The function returns an Object array containing 2 objects. The first is a Boolean that determines if
- the action was successful. The second item is a String containing any irregular message given when attempting to subscribe
- to the new subscription. If the action is successful and the first item is true, the second object is null and is not used in the
- given response.
Determines if a stream with the given hash contains the given request type.
- Utilizes the ExternalStreamConnection.containsRequestType(String) for
- determining if the subscription exists.
-
- If a stream with the given hash does not exist, this function returns false.
Sends a data request from the stream with the given hash. This request is in the form of a single
- (typically REST API) request, which will then return a series of data presented.
-
- If a stream with the given hash does not exist, this function returns false.
Executes a stream to start processing live data. Live data subscriptions must be called through
- subscribe(String, String) which will then add a new data subscription
- to the stream.
-
- If a stream with the given hash does not exist, is not authorized, is not ready, or is already
- executed, this function returns false.
Kills a currently active stream. This function will terminate any connection to the external stream
- and will immediately stop sending data to the output service. Even if the stream is unable to be killed,
- the connection between the data and the output service will be severed.
-
- If a stream with the given hash does not exist or is not active, this function returns false.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
Defines all processes used within the Router. Function is defined as blank
- however can be overwritten to define specific processes. All added processes must contain
- the explicit subtag they are listed under and the associated method to handle the subtag from.
-
-
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html b/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html
deleted file mode 100644
index 1aec186d..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/test/speed/package-use.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-Uses of Package test.speed
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Uses of Package test.speed
-
-No usage of test.speed
-
-
-
-
diff --git a/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js b/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js
deleted file mode 100644
index b2a677c6..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/doc/type-search-index.js
+++ /dev/null
@@ -1 +0,0 @@
-typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.stream.external.connected.connections","l":"AmberDataConnection"},{"p":"org.out.controller","l":"Controller"},{"p":"org.core.core","l":"Core"},{"p":"org.core.engine","l":"Engine"},{"p":"org.stream.external.handler","l":"ExternalStreamConnection"},{"p":"org.stream.external.handler","l":"ExternalStreamHandler"},{"p":"org.stream.external.handler","l":"ExternalStreamManager"},{"p":"org.framework.interfaces","l":"Hash"},{"p":"org.stream.local.handler","l":"LocalStreamConnection"},{"p":"org.stream.local.handler","l":"LocalStreamHandler"},{"p":"org.stream.local.handler","l":"LocalStreamManager"},{"p":"org.core.logger","l":"Logger"},{"p":"org.core.logger","l":"LogSeverity"},{"p":"org.main","l":"Main"},{"p":"org.framework.router","l":"Manager"},{"p":"org.out.handler","l":"OutputHandler"},{"p":"org.out.handler","l":"OutputLiveConnection"},{"p":"org.out.handler","l":"OutputStaticConnection"},{"p":"org.framework.router","l":"Packet"},{"p":"org.framework.router","l":"Response"},{"p":"org.framework.router","l":"ResponseFactory"},{"p":"org.framework.router","l":"Router"},{"p":"test.framework.router","l":"Router1"},{"p":"test.framework.router","l":"Router2"},{"p":"test.framework.router","l":"RouterTemp"},{"p":"test.framework.router","l":"RouterTemplate"},{"p":"test.speed","l":"RouterTemplate"},{"p":"org.stream.registry","l":"StreamAuthorization"},{"p":"org.stream.manager","l":"StreamManager"},{"p":"org.stream.registry","l":"StreamRegistryController"},{"p":"org.stream.external.connected.connections","l":"TemplateConnection"},{"p":"org.stream.local.connected.connections","l":"TemplateConnection"},{"p":"test.protocols","l":"TestESH"},{"p":"test.framework.router","l":"TestManager"},{"p":"test.framework.router","l":"TestPacket"},{"p":"test.framework.router","l":"TestPacketRouter"},{"p":"test.framework.router","l":"TestRouter"},{"p":"test.speed","l":"TestRouterSendSpeed"},{"p":"test.protocols","l":"TestSRC"},{"p":"org.framework.interfaces","l":"UUID"}];updateSearchResults();
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/pom.xml b/DeFi-Data-Engine/DeFi Data Engine/pom.xml
deleted file mode 100644
index 972a27ff..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/pom.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
- 4.0.0
- DeFiDataEngine
- defi-data-engine
- 0.0.1
- jar
-
-
-
- org.reflections
- reflections
- 0.10.2
-
-
- org.slf4j
- slf4j-api
- 1.7.5
-
-
- org.slf4j
- slf4j-log4j12
- 1.7.5
-
-
- log4j
- log4j
- 1.2.17
-
-
- org.mongodb
- mongo-java-driver
- 3.12.11
-
-
- com.squareup.okhttp3
- okhttp
- 4.2.0
-
-
- org.json
- json
- 20220320
-
-
- junit
- junit
- 4.13.2
-
-
-
-
- com.datastax.oss
- java-driver-core
- 4.9.0
-
-
-
-
-
-
-
-
- maven-surefire-plugin
- 3.0.0-M5
-
-
- log4j.xml
-
-
-
-
-
- maven-assembly-plugin
-
-
-
- org.main.Main
-
-
-
- jar-with-dependencies
-
-
-
-
-
-
-
- 17
- 1.8
- 1.8
-
-
-
-
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java
deleted file mode 100644
index 36debac0..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/core/Core.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.core.core;
-
-import org.core.engine.Engine;
-import org.core.logger.Logger;
-import org.framework.router.Response;
-import org.framework.router.Router;
-import org.out.controller.Controller;
-import org.out.handler.OutputHandler;
-import org.stream.manager.StreamManager;
-
-public class Core extends Router {
-
- public Core() {
- super("core", "COR");
-
- OutputHandler out = new OutputHandler();
- Controller crl = new Controller();
- Engine eng = new Engine();
- StreamManager str = new StreamManager();
-
- this.connect(out, crl, eng, str);
-
- Response response = this.send("ENG", "STRT");
- if(response.code() != 200)
- Logger.terminate(response);
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java
deleted file mode 100644
index d5315ff0..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/engine/Engine.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.core.engine;
-
-import org.framework.router.Packet;
-import org.framework.router.Response;
-import org.framework.router.ResponseFactory;
-import org.framework.router.Router;
-import org.properties.Config;
-
-public class Engine extends Router {
-
- public Engine() {
- super("engine", "ENG");
- }
-
- // source: source of the local stream to initialize
- public Response processSTRT(Packet packet) {
- // start output processes:
- Response out_response = send("OUT", "STRT");
- if(out_response.code() != 200)
- return out_response;
-
- // start local stream handler processes:
- String lsh_type = Config.getProperty("stream", "local.stream.type");
- if(!lsh_type.equals("null")) {
- Response lsh_response = send("LSH", "INIT", "source", lsh_type);
- if(lsh_response.code() != 200)
- return lsh_response;
- }
-
- return ResponseFactory.response200();
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java
deleted file mode 100644
index 49701500..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/LogSeverity.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.core.logger;
-
-/**
- * {@link LogSeverity} is a enum class used by all processes that interact
- * with the {@link Logger} class. There are several values which are used
- * to determine the severity of the message passed to the {@link Logger}.
- *
- * {@link LogSeverity#INFO}: General information regarding the system.
- * {@link LogSeverity#WARNING}: Warnings about system inconsistencies.
- * {@link LogSeverity#ERROR}: Errors that cause system failure.
- *
- * @author Conor Flynn
- *
- */
-public enum LogSeverity {
-
- INFO("INFO"),
- WARNING("WARNING"),
- ERROR("ERROR");
-
- private final String tag;
-
- private LogSeverity(String tag) {
- this.tag = tag;
- }
-
- /**
- * Tag related to the enum for printing.
- *
- * @return String corresponding to the given enum.
- */
- public String getTag() {
- return tag;
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java
deleted file mode 100644
index 4b849f56..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/core/logger/Logger.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.core.logger;
-
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-
-import org.framework.router.Packet;
-import org.framework.router.Response;
-
-public class Logger {
-
- public static final void log(String message) {
- System.out.println(messageFormat("INFO", message));
- }
-
- public static final void log(Packet packet) {
- System.out.println(packetFormat(packet));
- }
-
- public static final void log(Response response) {
- System.out.println(responseFormat(response));
- }
-
- public static final void warn(String message) {
- System.out.println(messageFormat("WARN", message));
- }
-
- public static final void warn(Packet packet) {
- System.err.println(packetFormat(packet));
- }
-
- public static final void warn(Response response) {
- System.err.println(responseFormat(response));
- }
-
- public static final void terminate(String message) {
- System.err.println(messageFormat("ERROR", message));
- }
-
- public static final void terminate(Packet packet) {
- System.err.println(packetFormat(packet));
- System.exit(1);
- }
-
- public static final void terminate(Response response) {
- System.err.println(responseFormat(response));
- System.exit(1);
- }
-
- private static final String messageFormat(String type, String message) {
- return String.format("[%s] [%-10s] %-9s- [%s]",
- time(),
- Thread.currentThread().getName(),
- type,
- message);
- }
-
- private static final String packetFormat(Packet packet) {
- return String.format("[%s] [%-10s] PACKET - [%3s -> %3s] [%4s] [%s]",
- time(),
- Thread.currentThread().getName(),
- packet.getSender(),
- packet.getTag(),
- packet.getSubTag(),
- packet.getData());
- }
-
- private static final String responseFormat(Response response) {
- return String.format("[%s] [%-10s] RESPONSE - [%3d] [%s] [%s]",
- time(),
- Thread.currentThread().getName(),
- response.code(),
- response.message(),
- response.data());
- }
-
- private static final String time() {
- return LocalDateTime.now()
- .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.nnnnnnnnn"));
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java
deleted file mode 100644
index 4be60859..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/Hash.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.framework.interfaces;
-
-import java.util.HashMap;
-
-/**
- * Interface used for requiring components to have a unique hash based on the passed data.
- * The hash does not require any standard formatting so long as it is unique.
- *
- * The standard algorithm that will be used is a salted SHA-512.
- *
- * @author Conor Flynn
- */
-public interface Hash {
- /**
- * Unique hash based on the passed data for identification. Algorithm is recommended to be
- * a salted SHA-512.
- *
- * @param data {@link HashMap} which holds all data, primarily that used for authorization.
- * @return {@link String} that contains the newly created hash.
- */
- public String getHash(HashMap data);
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java
deleted file mode 100644
index 78b6ffca..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/interfaces/UUID.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.framework.interfaces;
-
-/**
- * The UUID interface is used for requiring reflected classes to have a unique id that
- * they can be referenced by.
- *
- * Standard syntax for a UUID is all lower case, no numbers, and words being separated
- * by _.
- */
-public interface UUID {
-
- /**
- * UUID of the implementing class. Recommended to follow standard syntax
- * as referenced by {@link UUID}.
- *
- * @return {@link String} representing the UUID of the implementing class.
- */
- public String getUUID();
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java
deleted file mode 100644
index 209085e3..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Manager.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.framework.router;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.UUID;
-
-/**
- * The {@link Manager} class is used to handle all {@link Router} connections.
- * {@link Manager} objects have the ability to merge and combine networks of
- * {@link Router} objects efficiently and effectively.
- *
- * @author Conor Flynn
- *
- */
-public class Manager {
-
- private final String uuid;
- private final HashMap routers;
-
- /**
- * Private constructor used to create a new {@link Manager} object.
- * Used by {@link Manager#create(Router)} to connect the newly created
- * object to a {@link Router}.
- */
- private Manager() {
- uuid = UUID.randomUUID().toString();
- routers = new HashMap();
- }
-
- /**
- * Uniquely generated UUID created on object initialization.
- *
- * @return String representing the UUID of the object.
- */
- public String getUUID() {
- return uuid;
- }
-
- /**
- * String representation of the {@link Manager} object.
- *
- * @return UUID of the object. See {@link Manager#getUUID()} for more information.
- */
- public String toString() {
- return getUUID();
- }
-
- /**
- * Connects a {@link Router} object to the {@link Manager} object. Allows it to send
- * {@link Packet} object's to any {@link Router} on the network through {@link Manager#send(Packet)}.
- *
- * @param router {@link Router} object to connect to the {@link Manager} object.
- */
- protected void connect(Router router) {
- if(isConnected(router.getTag()))
- return;
-
- routers.put(router.getTag(), router);
- }
-
- /**
- * Disconnects a {@link Router} object from the {@link Manager} object. Removes access from
- * sending any {@link Packet} object's to any {@link Router} connected to the network.
- *
- * @param router {@link Router} object to disconnect from the {@link Manager} object.
- */
- protected void disconnect(Router router) {
- if(!isConnected(router.getTag()))
- return;
-
- routers.remove(router.getTag());
- }
-
- /**
- * Checks to see if a {@link Router} object with the specified tag is connected
- * to the network.
- *
- * @param tag Tag of the {@link Router} object to determine if it is connected to the network.
- * @return Boolean determining if a {@link Router} with the given tag exists on the network.
- */
- public boolean isConnected(String tag) {
- return routers.containsKey(tag);
- }
-
- /**
- * Collection of all {@link Router} objects connected to the {@link Manager} object.
- *
- * @return Collection of all {@link Router} objects stored within the {@link Manager}.
- */
- public Collection connected() {
- return routers.values();
- }
-
- /**
- * Collection of all {@link Router} object tags connected to the {@link Manager} object.
- *
- * @return Collection of all {@link Router} object tags stored within the {@link Manager}.
- */
- protected Collection tags() {
- return routers.keySet();
- }
-
- /**
- * Sends a {@link Packet} object between two {@link Router} objects stored in the network. Sent
- * packets are required to return a {@link Response} to the sender that determines the result
- * of the sent {@link Packet}.
- *
- * @param packet {@link Packet} object to send to the {@link Router}.
- * @return {@link Response} object returned from the receiver determining the state of the action performed
- * by the sent packet.
- */
- public Response send(Packet packet) {
- if(!routers.containsKey(packet.getTag()))
- return ResponseFactory.response404(packet.getSender(), packet.getTag());
-
- return routers.get(packet.getTag()).receive(packet);
- }
-
- /**
- * Static function used to create a new {@link Manager} object. Called by a {@link Router}
- * object when necessary. Automatically connects the passed {@link Router} to the {@link Manager}
- * upon initialization.
- *
- * @param router {@link Router} object that creates the {@link Manager} and then automatically connects to it.
- * @return New {@link Manager} object with the parameterized {@code router} object connected.
- */
- protected static Manager create(Router router) {
- Manager manager = new Manager();
- manager.connect(router);
- return manager;
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java
deleted file mode 100644
index 6ed0eff8..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Packet.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package org.framework.router;
-
-import java.util.HashMap;
-
-import org.core.logger.Logger;
-import org.properties.Config;
-
-/**
- * The {@link Packet} class represents a standardized data transfer object
- * used throughout the engine. It contains a series of values which help to
- * route it to different processes. This class interacts heavily with the
- * {@link Router} class.
- *
- * @author Conor Flynn
- *
- */
-public class Packet {
-
- private final static boolean log = Config.getProperty("app", "general.logging.packets").equals("true");
-
- private final String sender;
- private final String tag;
- private final String sub_tag;
- private final HashMap data;
-
- /**
- * Initializes a new {@link Packet} object.
- *
- * @param router {@link Router} object the {@link Packet} was sent from.
- * @param tag Tag of the destination the {@link Packet} will be sent to.
- * @param sub_tag Sub tag describing the action performed at the destination.
- * @param data Data transmitted through the {@link Packet} for processing at the destination.
- */
- private Packet(Router router, String tag, String sub_tag, HashMap data) {
- this.sender = router.getTag();
- this.tag = tag;
- this.sub_tag = sub_tag;
- this.data = data;
- }
-
- /**
- * Tag of the {@link Router} object that sent the {@link Packet}.
- *
- * @return Tag of the sending {@link Router} object.
- */
- public final String getSender() {
- return sender;
- }
-
- /**
- * Tag of the destination the {@link Packet} will be sent to.
- *
- * @return Tag of the {@link Router} the {@link Packet} is being sent to.
- */
- public final String getTag() {
- return tag;
- }
-
- /**
- * Sub tag determining the action of the {@link Packet} at the destination.
- *
- * @return Sub tag of the {@link Packet} object.
- */
- public final String getSubTag() {
- return sub_tag;
- }
-
- public final boolean containsKey(String key) {
- return data.containsKey(key);
- }
-
- /**
- * Data transmitted through the {@link Packet} for processing at the destination.
- *
- * @return String containing all data sent.
- */
- public final HashMap getData() {
- return data;
- }
-
- /**
- * Retrieves data point stored within {@link Packet}.
- *
- * @param key Key that the data point is stored under.
- * @return {@link String} containing data stored.
- */
- public final String getData(String key) {
- if(data.containsKey(key))
- return data.get(key);
-
- return null;
- }
-
- public final String validate(String... keys) {
- if(keys == null)
- return null;
-
- for(String key : keys)
- if(!data.containsKey(key) || data.get(key).equals(""))
- return key;
-
- return null;
- }
-
- /**
- * Factory method used to create a {@link Packet} object.
- *
- * @param router {@link Router} object the {@link Packet} was sent from.
- * @param tag Tag of the destination the {@link Packet} will be sent to.
- * @param sub_tag Sub tag describing the action performed at the destination.
- * @param data Data transmitted through the {@link Packet} for processing at the destination.
- * @return New {@link Packet} object.
- */
- public static Packet packet(Router router, String tag, String sub_tag, HashMap data) {
- if(data == null)
- return null;
-
- Packet packet = new Packet(router, tag, sub_tag, data);
- if(log)
- Logger.log(packet);
- return packet;
- }
-
- /**
- * Factory method used to create a {@link Packet} object.
- *
- * @param router {@link Router} object the {@link Packet} was sent from.
- * @param tag Tag of the destination the {@link Packet} will be sent to.
- * @param sub_tag Sub tag describing the action performed at the destination.
- * @param data Data transmitted through the {@link Packet} for processing at the destination.
- * @param sub_data Supporting data used for processing and transmitting from {@code data}.
- * @return New {@link Packet} object.
- */
- public static Packet packet(Router router, String tag, String sub_tag, String... data) {
- if(data.length % 2 != 0)
- return null;
-
- HashMap map = new HashMap();
- for(int i = 0; i < data.length; i+=2)
- map.put(data[i], data[i + 1]);
-
- Packet packet = new Packet(router, tag, sub_tag, map);
- if(log)
- Logger.log(packet);
- return packet;
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java
deleted file mode 100644
index cc71631a..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Response.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.framework.router;
-
-import org.core.logger.Logger;
-import org.properties.Config;
-
-/**
- * The {@link Response} class is used to relay information from a
- * given {@link Packet} sent through a {@link Router}. {@link Response}
- * objects contain two fields: code and message.
- *
- * The code refers to the response code listed in the documentation, which
- * can be used to determine certain interactions the sent {@link Packet} may
- * have had.
- *
- * The message refers to the message sent with the response code, which may
- * contain more detailed information of the response. This value may be left
- * blank based on the response code as some codes do not need any more information
- * than what is provided.
- *
- * @author Conor Flynn
- *
- */
-public final class Response {
-
- private final static boolean log = Config.getProperty("app", "general.logging.responses").equals("true");
-
- private final int code;
- private final String message;
- private final String data;
-
- /**
- * Constructor used for creating a new {@link Response} object. Must
- * be accessed through the {@link Response#create(int, String, String)} function.
- *
- * @param code Response code to be sent.
- * @param message Message to be sent to accompany the response code.
- */
- private Response(int code, String message) {
- this.code = code;
- this.message = message;
- this.data = "";
- }
-
- /**
- * Constructor used for creating a new {@link Response} object. Must
- * be accessed through the {@link Response#create(int, String, String)} function.
- *
- * @param code Response code to be sent.
- * @param message Message to be sent to accompany the response code.
- * @param data {@link String} of data to be returned in the response.
- */
- private Response(int code, String message, String data) {
- this.code = code;
- this.message = message;
- this.data = data;
- }
-
- /**
- * Response code of the {@link Response} object. Gives high level overview of the
- * sent {@link Packet} object's response.
- *
- * See documentation for more detailed explanation of all response codes.
- *
- * @return {@link Integer} value representing response from {@link Packet} submission.
- */
- public int code() {
- return code;
- }
-
- /**
- * Response message which is used for containing more detailed information about the
- * response code if necessary. This field may be left blank if not needed.
- *
- * @return {@link String} value representing the response message.
- */
- public String message() {
- return message;
- }
-
- /**
- * {@link String} of all data contained within the {@link Response} object. Parameter
- * is optional and will return an empty {@link String} if not defined on initialization.
- *
- * @return {@link String} containing all returned data by the {@link Response} object.
- */
- public String data() {
- return data;
- }
-
- /**
- * Static function used for creating a new {@link Response} object. Formats and returns
- * the new response based on the parameters included below.
- *
- * @param code Response code of the {@link Response} object.
- * @param message Response message of the {@link Response} object. Uses {@link String#format(String, Object...)} for formatting with {@code args} parameter.
- * @return New {@link Response} object formatted based on the passed parameters.
- */
- protected static Response create(int code, String message) {
- Response response = new Response(code, message);
- if(log)
- Logger.log(response);
- return response;
- }
-
- /**
- * Static function used for creating a new {@link Response} object. Formats and returns
- * the new response based on the parameters included below.
- *
- * @param code Response code of the {@link Response} object.
- * @param message Response message of the {@link Response} object. Uses {@link String#format(String, Object...)} for formatting with {@code args} parameter.
- * @param data {@link String} of data to be returned in the response.
- * @return New {@link Response} object formatted based on the passed parameters.
- */
- protected static Response create(int code, String message, String data) {
- Response response = new Response(code, message, data);
- if(log)
- Logger.log(response);
- return response;
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java
deleted file mode 100644
index d90fc193..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/ResponseFactory.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.framework.router;
-
-import java.util.Arrays;
-import java.util.HashMap;
-
-public class ResponseFactory {
-
- public static void responseNotHandled(String message) {
- System.err.println(message);
- System.exit(1);
- }
-
- /**
- * Blank template response used for sending non-required responses
- *
- * @return A new {@link Response} object with a response code of 0 and a blank response message.
- */
- public static Response response0() {
- return Response.create(0, "");
- }
-
- public static Response response200() {
- return Response.create(200, "Successful Response.");
- }
-
- public static Response response200(String data) {
- return Response.create(200, "", data);
- }
-
- public static Response response220(String hash) {
- return Response.create(220, String.format("Stream with generated hash <%s> already exists. Using existing stream for connections.", hash), String.format("%s", hash));
- }
-
- public static Response response400(String router) {
- return Response.create(400, String.format("Router <%s> has not been connected to a network and cannot send Packets. "
- + "Connect to another Router before sending Packets.", router));
- }
-
- public static Response response404(String router, String destination) {
- return Response.create(404, String.format("Destination with tag <%s> was not found within Router <%s>. Check Router "
- + "connections to make sure all necessary connections are made.", router, destination));
- }
-
- public static Response response405(String router, String subtag) {
- return Response.create(405, String.format("Router <%s> does not contain sub process <%s>. Check to make sure subtag "
- + "is written properly.", router, subtag));
- }
-
- public static Response response407(String router, String tag, String sub_tag, String... data) {
- return Response.create(407, String.format("Malformed packet when sending data from <%s> to <%s> using protocol "
- + "<%s>. Data does not contain an even amount of pairs. Data <%s>.",
- router, tag, sub_tag, Arrays.toString(data)));
- }
-
- public static Response response410(String router, String subtag) {
- return Response.create(410, String.format("Router <%s> process <%s> is formatted incorrectly. Check to make sure the process' "
- + "method contains the proper format of .", router, subtag));
- }
-
- public static Response response420(String source) {
- return Response.create(420, String.format("Requested data source <%s> does not exist in cache.", source));
- }
-
- public static Response response421(String hash) {
- return Response.create(421, String.format("Requested data stream with given hash <%s> does not exist in cache.", hash));
- }
-
- public static Response response422(String source) {
- return Response.create(422, String.format("Failure to authorize the external data source <%s> with the given properties.", source));
- }
-
- public static Response response423(String hash) {
- return Response.create(423, String.format("Stream with hash <%s> is not ready and cannot be executed.", hash));
- }
-
- public static Response response424(String hash) {
- return Response.create(424, String.format("Stream with hash <%s> is already active and cannot be executed again.", hash));
- }
-
- public static Response response425(String hash) {
- return Response.create(425, String.format("Stream with hash <%s> is not active and cannot be killed.", hash));
- }
-
- public static Response response426(String hash, String subscription) {
- return Response.create(426, String.format("Stream with hash <%s> does not contain a subscription request of type <%s>.", hash, subscription));
- }
-
- public static Response response427(String type, String response) {
- return Response.create(427, String.format("Stream of type <%s> returned an irregular response when attempting to send request. Response returned is: <%s>", type, response));
- }
-
- public static Response response428(String hash, String request) {
- return Response.create(428, String.format("Stream with hash <%s> does not contain a request type of <%s>", hash, request));
- }
-
- public static Response response429(String hash, String request, String response) {
- return Response.create(429, String.format("Stream with hash <%s> returned an irregular response when attempting to subscribe to <%s>. Response returned is: <%s>", hash, request, response));
- }
-
- public static Response response430(HashMap data) {
- return Response.create(430, String.format("Stream hash could not be generated with the given properties: <%s>", data));
- }
-
- public static Response response440(String source) {
- return Response.create(440, String.format("Requested data source <%s> does not exist in cache.", source));
- }
-
- public static Response response441(String source) {
- return Response.create(441, String.format("Local data stream with source <%s> is not ready to handle queries.", source));
- }
-
- public static Response response442(String source) {
- return Response.create(442, String.format("Failed to add local data source <%s>.", source));
- }
-
- public static Response response443(String source) {
- return Response.create(443, String.format("Local data stream with source <%s> already exists.", source));
- }
-
- public static Response response444(String source) {
- return Response.create(444, String.format("Failure to authorize the local data source <%s> with the given properties.", source));
- }
-
- public static Response response445(String source, String query) {
- return Response.create(445, String.format("Local data stream with source <%s> could not validate passed query <%s>.", source, query));
- }
-
- public static Response response446(String source, String query) {
- return Response.create(446, String.format("Local data stream with source <%s> does not contain data from requested query <%s>.", source, query));
- }
-
- public static Response response447(String source, String query) {
- return Response.create(447, String.format("Local data stream with source <%s> failed to process the query <%s>.", source, query));
- }
-
- public static Response response448(String source, String query) {
- return Response.create(448, String.format("Local data stream with source <%s> failed to retrieve state with the query <%s>.", source, query));
- }
-
- public static Response response449(String source, String data, String... location) {
- return Response.create(449, String.format("Local data stream with source <%s> failed to push data point <%s> to given location <%s>", source, data, Arrays.toString(location)));
- }
-
- public static Response response460(String consumer) {
- return Response.create(460, String.format("Output consumer <%s> failed to listen to consumption channel.", consumer));
- }
-
- public static Response response470(String producer) {
- return Response.create(470, String.format("Output producer <%s> failed to listen to production channel.", producer));
- }
-
- public static Response response471(String key) {
- return Response.create(471, String.format("Output manager does not contain destination with key <%s>", key));
- }
-
- public static Response response472(String key) {
- return Response.create(472, String.format("Output producer failed to send data to external connection <%s>.", key));
- }
-
- public static Response response500(String loc, String parameter) {
- return Response.create(500, String.format("Engine component <%s> missing required parameter <%s>. Recall action with proper formatting.", loc, parameter));
- }
-
- public static Response response501() {
- return Response.create(501, String.format("Fatal error occurred. This response should not be displayed."));
- }
-
- public static Response response501(String message) {
- return Response.create(501, String.format("Fatal error occurred. This response should not be displayed. Message: <%s>", message));
- }
-
- public static Response response502() {
- return Response.create(502, String.format("Internal language failure. This error is commonly causes by a static protocol being treated as a live protocol or vice versa."));
- }
-
- public static Response response503(String format, String... dates) {
- return Response.create(503, String.format("Local data stream failed to process date of the format <%s> from given strings <%s>", format, Arrays.toString(dates)));
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java
deleted file mode 100644
index f839548e..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/framework/router/Router.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package org.framework.router;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-
-/**
- * The Router is a super class that every process inherits. It is used to route data in a
- * standardized manner throughout the engine. Each process that inherits the Router super class
- * will be required to supply several types of information. See documentation for further
- * details.
- *
- * @author Conor Flynn
- *
- */
-public abstract class Router {
-
- private final String uuid;
- private final String tag;
- private Manager manager;
- private final HashMap processes;
-
- /**
- * Initializes the Router object to handle processing packets. Router
- * does not have any contained tags other than identifying tag.
- *
- * @param uuid Unique identifier of the inheriting process.
- * @param tag Unique tag of the inheriting process.
- */
- public Router(String uuid, String tag) {
- this(uuid, tag, null);
- }
-
- /**
- * Initializes the Router object to handle processing {@link Packet} objects.
- *
- * @param uuid Unique identifier of the inheriting process.
- * @param tag Unique tag of the inheriting process.
- * @param manager {@link Manager} object which determines the network of processes the router is connected to.
- *
- * @throws IllegalArgumentException Thrown if {@link Router} object's tag already exists within the
- * contained_tags list passed in the constructor.
- */
- public Router(String uuid, String tag, Manager manager) {
- this.uuid = uuid;
- this.tag = tag;
- this.manager = manager;
- this.processes = new HashMap();
-
- try {
- defineProcesses();
- } catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Unique identifier of the inheriting process.
- *
- * @return String representation of UUID.
- */
- public final String getUUID() {
- return uuid;
- }
-
- /**
- * Unique tag of the inheriting process.
- *
- * @return Unique 3 character string representing tag.
- */
- public final String getTag() {
- return tag;
- }
-
- /**
- * {@link Manager} that this {@link Router} is connected to.
- *
- * @return {@link Manager} object of the {@link Router}.
- */
- public final Manager getManager() {
- return manager;
- }
-
- /**
- * Updates the {@link Manager} this {@link Router} is connected to.
- * Disconnects from the old {@link Manager} as well if it is not
- * {@code null}.
- *
- * @param manager {@link Manager} object to connect this {@link Router} to.
- */
- protected final void setManager(Manager manager) {
- // disconnect from previous manager if non-null
- if(this.manager != null)
- this.manager.disconnect(this);
-
- // update new manager and connect
- this.manager = manager;
- this.manager.connect(this);
- }
-
- /**
- * Connects all passed {@link Router} objects to this {@link Router} object's {@link Manager}.
- * Merges all {@link Router} objects within both networks such that they can all communicate with
- * each other.
- *
- * Creates a new {@link Manager} object for this {@link Router} if it is {@code null}.
- *
- * @param routers {@link Router} objects to connect to this {@link Router} object's network.
- */
- public final void connect(Router... routers) {
- // connect all routers in list to current manager
- // if manager is null then create new manager
- if(manager == null)
- manager = Manager.create(this);
-
- HashSet network = new HashSet();
-
- for(Router router : routers) {
- if(router.manager == null)
- network.add(router);
- else
- for(Router managed : router.manager.connected())
- network.add(managed);
- }
-
- for(Router router : network)
- router.setManager(manager);
- }
-
- /**
- * Determines if a {@link Router} object with the passed tag
- * exists on the network.
- *
- * @param tag Tag of the {@link Router} object to search for.
- * @return Boolean determining if {@link Router} object with passed tag exists.
- */
- public final boolean isConnected(String tag) {
- return manager.isConnected(tag);
- }
-
- /**
- * Determines if a {@link Router} object exists on the network. Uses
- * the passed {@link Router} object's tag to determine existence and references
- * {@link Router#isConnected(String)}.
- *
- * @param router {@link Router} object to search for.
- * @return Boolean determining if {@link Router} object exists.
- */
- public final boolean isConnected(Router router) {
- return isConnected(router.tag);
- }
-
- /**
- * Collection of all {@link Router} object's tags that are connected to the network.
- * See {@link Router#getTag()} for more information.
- *
- * @return Collection of all connected {@link Router} object's tags.
- */
- protected final Collection connectedTags() {
- return manager.tags();
- }
-
- /**
- * Function used to send a {@link Packet} object to the desired destination.
- *
- * @param tag Tag Tag of the destination's {@link Router} object.
- * @param sub_tag Sub tag describing the action performed at the destination.
- * @param data Data transmitted through the {@link Packet} for processing at the destination.
- * @return Integer representing the return code of the sent {@link Packet}.
- */
- public final Response send(String tag, String sub_tag, HashMap data) {
- if(manager == null)
- return ResponseFactory.response400(this.getTag());
-
- Packet packet = Packet.packet(this, tag, sub_tag, data);
- if(packet == null)
- return ResponseFactory.response407(this.tag, tag, sub_tag, data.toString());
-
- return manager.send(packet);
- }
-
- /**
- * Function used to send a {@link Packet} object to the desired destination.
- *
- * @param tag Tag Tag of the destination's {@link Router} object.
- * @param sub_tag Sub tag describing the action performed at the destination.
- * @param data Data transmitted through the {@link Packet} for processing at the destination.
- * @param sub_data Supporting data used for processing and transmitting from {@code data}. This parameter is optional.
- * @return Integer representing the return code of the sent {@link Packet}.
- */
- public final Response send(String tag, String sub_tag, String... data) {
- if(manager == null)
- return ResponseFactory.response400(this.getTag());
-
- // create packet and push to receive method
- Packet packet = Packet.packet(this, tag, sub_tag, data);
- if(packet == null)
- return ResponseFactory.response407(this.tag, tag, sub_tag, data);
-
- return manager.send(packet);
- }
-
- /**
- * Function used for receiving {@link Packet} objects and determining whether
- * to route them to a connected {@link Router} or to process them through the
- * {@link Router#process(Packet)} function.
- *
- * @param packet {@link Packet} object received by the {@link Router}.
- * @return Integer representing the return code of the sent {@link Packet}.
- */
- public final Response receive(Packet packet) {
- return process(packet);
- }
-
- /**
- * Adds a process to the {@link Router} object under the given {@code subtag}.
- * When the {@link Router} object receives a {@link Packet} with the given
- * {@code subtag}, it will auto route the {@link Packet} to the stored method.
- *
- * All {@link Method} objects must contain a single parameter, a {@link Packet} object,
- * and return a {@link Response} object.
- *
- * @param sub_tag Subtag of the process to handle the incoming {@link Packet} object.
- * @param method {@link Method} to pass the {@link Packet} object to.
- */
- public final void addProcess(String sub_tag, Method method) {
- processes.put(sub_tag, method);
- }
-
- /**
- * Function used to handle incoming {@link Packet} objects.
- *
- * Returns a 405 response code should the {@link Router} not support the
- * given {@link Packet#getSubTag()} process.
- *
- * @param packet {@link} Packet object to be processed.
- * @return Integer representing the return code of the sent {@link Packet}
- */
- private final Response process(Packet packet) {
- if(!processes.containsKey(packet.getSubTag()))
- return ResponseFactory.response405(this.getTag(), packet.getSubTag());
-
- try {
- return (Response)processes.get(packet.getSubTag()).invoke(this, packet);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return ResponseFactory.response410(this.getTag(), packet.getSubTag());
- }
-
- /**
- * Defines all processes used within the {@link Router}. All added processes must contain
- * the explicit subtag they are listed under and the associated method to handle the subtag from.
- */
- private final void defineProcesses() throws NoSuchMethodException, SecurityException {
- Method[] methods = getClass().getMethods();
- for(Method method : methods) {
- if(!method.getName().contains("process"))
- continue;
-
- method.setAccessible(true);
- addProcess(method.getName().replace("process", ""), method);
- }
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java
deleted file mode 100644
index c818b504..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/main/Main.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.main;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
-import org.core.core.Core;
-
-public class Main {
-
- public static void main(String[] args) throws InterruptedException {
- // disable loggers
- LogManager.getRootLogger().setLevel(Level.OFF);
-
- // initialize new Core
- Thread thread = new Thread() {
- public void run() {
- new Core();
- }
- };
-
- // start thread
- thread.start();
-
- while(true) {
- Thread.sleep(10000);
- }
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java
deleted file mode 100644
index 366a0ad8..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/consumers/SocketConsumer.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.out.consumers;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.SocketException;
-import java.util.Arrays;
-
-import org.framework.router.Response;
-import org.json.JSONObject;
-import org.out.handler.OutputConsumer;
-import org.out.handler.OutputManager;
-import org.out.socket.SocketManager;
-import org.properties.Config;
-
-public class SocketConsumer extends OutputConsumer {
-
- private Thread listener;
-
- public SocketConsumer(OutputManager manager) {
- super(manager);
- }
-
- public String getUUID() {
- return "socket_consumer";
- }
-
- @Override
- protected boolean init() {
- int port = Integer.parseInt(Config.getProperty("stream", "rest.socket.port"));
-
- // create server
- if(!SocketManager.createServer(port))
- return false;
-
- // accept inflow from REST
- final String key = Config.getProperty("stream", "rest.socket.key");
-
- if(!SocketManager.accept(port, key))
- return false;
-
- listener = new Thread() {
- public void run() {
- try {
- DataInputStream in = SocketManager.read(key);
- DataOutputStream out = SocketManager.write(key);
-
- // listen for data packets from rest socket
- while(true) {
- String[] input = ((String)in.readUTF()).split(Config.getProperty("app", "general.transfer.delim"));
-
- Thread thread = new Thread() {
- public void run() {
- try {
- // validate length is greater than 2
- if(input.length <= 2) {
- out.writeUTF(new JSONObject()
- .put("response", "502")
- .put("message", "Packet processed from REST API does not contain a TAG or SUB_TAG. Review REST API endpoint code.")
- .toString());
- }
-
- // extract non-essential data
- String[] data = Arrays.copyOfRange(input, 2, input.length);
- String tag = input[0];
- String sub_tag = input[1];
-
- // execute valid response to engine
- Response response = send(tag, sub_tag, data);
- out.writeUTF(new JSONObject()
- .put("response", "200")
- .put("code", response.code())
- .put("message", response.message())
- .put("data", response.data())
- .toString());
- out.flush();
-
- } catch(SocketException e) {
- System.err.println("Rest Application has unexpectedly closed.");
- System.exit(1);
- } catch (IOException e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- };
-
- thread.start();
- }
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- };
-
- return true;
- }
-
- @Override
- protected boolean listen() {
- // server not initialized
- if(listener == null)
- return false;
-
- listener.start();
- return true;
- }
-
- @Override
- protected boolean kill() {
- listener.interrupt();
- return true;
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java
deleted file mode 100644
index ffba5104..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/controller/Controller.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.out.controller;
-
-import org.framework.router.Router;
-
-public class Controller extends Router {
-
- public Controller() {
- super("controller", "CRL");
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java
deleted file mode 100644
index 2b23eab4..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/destinations/SocketDestination.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.out.destinations;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.framework.router.Packet;
-import org.json.JSONException;
-import org.out.handler.OutputDestination;
-
-public class SocketDestination extends OutputDestination {
-
- private final DataOutputStream out;
-
- public SocketDestination(String key, DataOutputStream out) {
- super(key);
-
- this.out = out;
- }
-
- public final synchronized boolean send(Packet packet) {
- try {
- out.write(packet.getData("data").getBytes());
- out.write(10);
- out.flush();
- } catch (JSONException | IOException e) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java
deleted file mode 100644
index 12fb4274..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputConsumer.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.out.handler;
-
-import org.framework.interfaces.UUID;
-import org.framework.router.Response;
-
-public abstract class OutputConsumer implements UUID {
-
- private final OutputManager manager;
-
- public OutputConsumer(OutputManager manager) {
- this.manager = manager;
- }
-
- protected final Response send(String tag, String sub_tag, String... data) {
- return manager.send(tag, sub_tag, data);
- }
-
- protected abstract boolean init();
- protected abstract boolean listen();
- protected abstract boolean kill();
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java
deleted file mode 100644
index 4b725310..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputDestination.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.out.handler;
-
-import org.framework.router.Packet;
-
-public abstract class OutputDestination {
-
- private final String key;
-
- public OutputDestination(String key) {
- this.key = key;
- }
-
- public final String getKey() {
- return key;
- }
-
- public abstract boolean send(Packet packet);
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java
deleted file mode 100644
index 26d99db9..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.out.handler;
-
-import org.framework.router.Packet;
-import org.framework.router.Response;
-import org.framework.router.ResponseFactory;
-import org.framework.router.Router;
-
-public class OutputHandler extends Router {
-
- private final OutputManager manager;
-
- public OutputHandler() {
- super("output_handler", "OUT");
-
- manager = new OutputManager(this);
- }
-
- public Response processSTRT(Packet packet) {
- // activate all output connections
- try {
- Object[] consumer_response = manager.consumerListen();
- if(!(boolean)consumer_response[0])
- return ResponseFactory.response460(consumer_response[1].toString());
-
- Object[] producer_response = manager.producerListen();
- if(!(boolean)producer_response[0])
- return ResponseFactory.response470(producer_response[1].toString());
-
- return ResponseFactory.response200();
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
-
- return ResponseFactory.response501();
- }
-
- public Response processEDAT(Packet packet) {
- String destination = packet.getData("destination");
- if(destination == null)
- return ResponseFactory.response500("OutputHandler", "destination");
-
- if(destination.equals("null"))
- return ResponseFactory.response200();
-
- if(!manager.containsDestination(destination))
- return ResponseFactory.response471(destination);
-
- if(!manager.send(destination, packet))
- return ResponseFactory.response472(destination);
-
- return ResponseFactory.response200();
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java
deleted file mode 100644
index ea376f9a..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputManager.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.out.handler;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.framework.router.Packet;
-import org.framework.router.Response;
-import org.properties.Config;
-import org.reflections.Reflections;
-
-public class OutputManager {
-
- private final OutputHandler handler;
- private final HashMap> consumer_templates;
- private final HashMap> producer_templates;
- private final HashSet consumers;
- private final HashSet producers;
-
- private final HashMap destinations;
-
- public OutputManager(OutputHandler handler) {
- this.handler = handler;
- this.consumer_templates = new HashMap>();
- this.producer_templates = new HashMap>();
- this.consumers = new HashSet();
- this.producers = new HashSet();
- this.destinations = new HashMap();
-
- // reflect all consumer/producer types
- try {
- reflect();
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
-
- // load all output connections
- try {
- load();
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
-
-
- }
-
- private void reflect() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
- Reflections consumer_reflection = new Reflections("org.out.consumers");
- Set> consumer_types = consumer_reflection.getSubTypesOf(OutputConsumer.class);
- for(Class extends OutputConsumer> c : consumer_types)
- consumer_templates.put(c.getDeclaredConstructor(OutputManager.class).newInstance(this).getUUID(), c);
-
- Reflections producer_reflection = new Reflections("org.out.producers");
- Set> producer_types = producer_reflection.getSubTypesOf(OutputProducer.class);
- for(Class extends OutputProducer> c : producer_types)
- producer_templates.put(c.getDeclaredConstructor(OutputManager.class).newInstance(this).getUUID(), c);
- }
-
- private void load() {
- // load consumers:
- String[] consumer_types = Config.getProperty("stream", "general.consumer.types").replaceAll(" ", "").split(",");
- for(String type : consumer_types) {
- if(type.equals("null"))
- continue;
-
- OutputConsumer consumer = null;
- try {
- consumer = consumer_templates.get(type).getDeclaredConstructor(OutputManager.class).newInstance(this);
- consumers.add(consumer);
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- // load producers:
- String[] producer_types = Config.getProperty("stream", "general.producer.types").replaceAll(" ", "").split(",");
- for(String type : producer_types) {
- if(type.equals("null"))
- continue;
-
- OutputProducer producer = null;
- try {
- producer = producer_templates.get(type).getDeclaredConstructor(OutputManager.class).newInstance(this);
- producers.add(producer);
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-
- public Object[] consumerListen() {
- // execute all consumers
- for(OutputConsumer consumer : consumers)
- if(!consumer.init() || !consumer.listen())
- return new Object[] {false, consumer.getUUID()};
-
- return new Object[] {true, ""};
- }
-
- public Object[] producerListen() {
- // execute all producers
- for(OutputProducer producer : producers)
- if(!producer.init() || !producer.listen())
- return new Object[] {false, producer.getUUID()};
-
- return new Object[] {true, ""};
- }
-
- public final Response send(String tag, String sub_tag, String... data) {
- return handler.send(tag, sub_tag, data);
- }
-
- public final synchronized void add(OutputDestination destination) {
- destinations.put(destination.getKey(), destination);
- }
-
- public final synchronized void remove(String key) {
- destinations.remove(key);
- }
-
- public final boolean containsDestination(String key) {
- return destinations.containsKey(key);
- }
-
- public final boolean send(String key, Packet packet) {
- if(!destinations.containsKey(key))
- return false;
-
- return destinations.get(key).send(packet);
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java
deleted file mode 100644
index 42b48038..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/handler/OutputProducer.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.out.handler;
-
-import org.framework.interfaces.UUID;
-import org.framework.router.Response;
-
-public abstract class OutputProducer implements UUID {
-
- protected final OutputManager manager;
-
- public OutputProducer(OutputManager manager) {
- this.manager = manager;
- }
-
- protected final Response send(String tag, String sub_tag, String data) {
- return manager.send(tag, sub_tag, data);
- }
-
- protected abstract boolean init();
- protected abstract boolean listen();
- protected abstract boolean kill();
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java
deleted file mode 100644
index 6c70167d..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/producers/SocketProducer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.out.producers;
-
-import org.framework.router.Response;
-import org.out.destinations.SocketDestination;
-import org.out.handler.OutputManager;
-import org.out.handler.OutputProducer;
-import org.out.socket.SocketManager;
-import org.properties.Config;
-
-public class SocketProducer extends OutputProducer {
-
- private Thread listener;
- public final SocketProducer producer = this;
-
- public SocketProducer(OutputManager manager) {
- super(manager);
- }
-
- @Override
- public String getUUID() {
- return "socket_producer";
- }
-
- @Override
- protected boolean init() {
- listener = new Thread() {
- public void run() {
- while(true) {
- String key = SocketManager.accept(Integer.parseInt(Config.getProperty("stream", "output.socket.port")), producer);
- if(key == null) {
- System.err.println("SocketProducer: Could not create connection to socket port.");
- System.exit(1);
- }
- manager.add(new SocketDestination(key, SocketManager.write(key)));
- }
- }
- };
-
- return true;
- }
-
- @Override
- protected boolean listen() {
- if(listener == null)
- return false;
-
- listener.start();
- return true;
- }
-
- @Override
- protected boolean kill() {
- try {
- listener.interrupt();
- } catch(Exception e) {}
-
- return true;
- }
-
- public Response send(String tag, String sub_tag, String... data) {
- return manager.send(tag, sub_tag, data);
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java
deleted file mode 100644
index 0751cb62..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/out/socket/SocketManager.java
+++ /dev/null
@@ -1,262 +0,0 @@
-package org.out.socket;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.UUID;
-
-import org.core.logger.Logger;
-import org.framework.router.Response;
-import org.json.JSONObject;
-import org.out.producers.SocketProducer;
-import org.properties.Config;
-
-public class SocketManager {
-
- private static final HashMap servers = new HashMap();
- private static final HashMap connections = new HashMap();
- private static final HashMap> registry = new HashMap>();
- private static final HashMap inflow = new HashMap();
- private static final HashMap outflow = new HashMap();
-
- private static final long HEARTBEAT_OFFSET = 5000L;
-
- public synchronized static boolean createServer(int port) {
- if(servers.containsKey(port))
- return true;
-
- try {
- ServerSocket server = new ServerSocket(port);
- servers.put(port, server);
- registry.put(server.getInetAddress().toString(), new HashSet());
- return true;
- } catch (IOException e) {
- e.printStackTrace();
- return false;
- }
- }
-
- public synchronized static boolean exists(String key) {
- return connections.containsKey(key);
- }
-
- public synchronized static void createThread(String key, SocketProducer producer) {
- Thread thread = new Thread() {
- public void run() {
- // perform logger verifications
- Logger.log(String.format("Starting thread for Socket with key <%s>", key));
- if(!inflow.containsKey(key)) {
- Logger.terminate(String.format("Key <%s> not found within inflow thread configuration, manual review recommended.", key));
- return;
- }
-
- if(!outflow.containsKey(key)) {
- Logger.terminate(String.format("Key <%s> not found within outflow thread configuration, manual review recommended.", key));
- return;
- }
-
- // retrieve inflow stream and listen
- DataInputStream in = inflow.get(key);
- DataOutputStream out = outflow.get(key);
- String str;
- while(true) {
- try {
- str = readLine(in);
-
- // parse input
- String[] input = str.split(Config.getProperty("app", "general.transfer.delim"));
-
- // validate input
- if(input.length <= 2) {
- out.writeUTF(new JSONObject()
- .put("response", "502")
- .put("message", "Packet processed from REST API does not contain a TAG or SUB_TAG. Review REST API endpoint code.")
- .toString());
- }
-
- // extract non-essential data
- String[] data = Arrays.copyOfRange(input, 2, input.length);
- String tag = input[0];
- String sub_tag = input[1];
-
- // retrieve destination
- String temp_destination = "";
- for(int i = 0; i < data.length; i++) {
- if(data[i].equals("destination") && data.length - 1 != i)
- temp_destination = data[i + 1];
- }
-
- // if no destination found then continue
- if(temp_destination.equals(""))
- continue;
-
- final String destination = temp_destination;
-
- // create heartbeat connection
- Thread heartbeat = new Thread() {
- public void run() {
- while(true) {
- try {
- Thread.sleep(HEARTBEAT_OFFSET);
- producer.send("OUT", "EDAT",
- "data", "<<>>",
- "destination", destination);
- } catch(Exception e) {
- Logger.log(String.format("Heartbeat connection terminated for Socket with key <%s>", key));
- break;
- }
- }
- }
- };
-
- // start heartbeat
- heartbeat.start();
-
- // execute valid response to engine
- Response response = producer.send(tag, sub_tag, data);
-
- // send response signifier
- producer.send("OUT", "EDAT",
- "data", "<<>>",
- "destination", destination);
- // send response details
- producer.send("OUT", "EDAT",
- "data", new JSONObject()
- .put("response", "200")
- .put("code", response.code())
- .put("message", response.message())
- .put("data", response.data())
- .toString(),
- "destination", destination);
-
- // terminate heartbeat
- try {
- heartbeat.interrupt();
- } catch(Exception e) {}
-
- } catch(Exception e) {
- break;
- }
- }
-
- Logger.log(String.format("Terminating thread for Socket with key <%s>", key));
- }
- };
-
- thread.start();
- }
-
- // used for generic channel accepting
- public synchronized static String accept(int port, SocketProducer producer) {
- if(!servers.containsKey(port))
- if(!createServer(port))
- return null;
-
- try {
- // accept new connection
- Socket connection = servers.get(port).accept();
-
- // validate new connection:
- DataInputStream in = new DataInputStream(connection.getInputStream());
- DataOutputStream out = new DataOutputStream(connection.getOutputStream());
- String key = UUID.randomUUID().toString();
- out.write(key.getBytes());
- out.write(10);
-
- Logger.log("Successfully connected to external socket. Key <" + key + ">");
-
- if(connections.containsKey(key))
- connections.get(key).close();
-
- connections.put(key, connection);
- inflow.put(key, in);
- outflow.put(key, new DataOutputStream(connection.getOutputStream()));
- registry.get(servers.get(port).getInetAddress().toString()).add(key);
-
- if(!synced(key))
- throw new Exception("Connection inflow and outflow not synchronized");
-
- // start internal thread for socket information parsing
- createThread(key, producer);
-
- return key;
- } catch(Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- // used for reserved channel accepting
- public synchronized static boolean accept(int port, String required_key) {
- if(!servers.containsKey(port))
- if(!createServer(port))
- return false;
-
- try {
- // accept new connection
- Socket connection = servers.get(port).accept();
- // validate new connection:
- DataInputStream in = new DataInputStream(connection.getInputStream());
-
- String key = in.readUTF();
-
- if(!required_key.equals(key)) {
- connection.close();
- return false;
- }
-
- if(connections.containsKey(key))
- return false;
-
- connections.put(key, connection);
- inflow.put(key, in);
- outflow.put(key, new DataOutputStream(connection.getOutputStream()));
- registry.get(servers.get(port).getInetAddress().toString()).add(key);
-
- if(!synced(key))
- throw new Exception("Connection inflow and outflow not synchronized.");
-
- Logger.log("Successfully connected to reserved socket. Key <" + key + ">");
-
- return true;
-
- } catch (Exception e) {
- e.printStackTrace();
- return false;
- }
- }
-
- public static DataOutputStream write(String key) {
- if(!exists(key))
- return null;
-
- return outflow.get(key);
- }
-
- public static DataInputStream read(String key) {
- if(!exists(key))
- return null;
-
- return inflow.get(key);
- }
-
- private static boolean synced(String key) {
- return connections.containsKey(key) && inflow.containsKey(key) && outflow.containsKey(key);
- }
-
- private static final String readLine(DataInputStream in) throws IOException {
- StringBuilder out = new StringBuilder();
- char c = 0;
- while((c = (char)in.read()) != 10) {
- if(out.length() > 200_000)
- break;
- out.append(c);
- }
- return out.toString();
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java
deleted file mode 100644
index cbf67676..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/properties/Config.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.properties;
-
-import java.util.HashMap;
-import java.util.Properties;
-
-public class Config {
-
- private static final HashMap properties;
-
-static {
- properties = new HashMap();
-
- Properties app_properties = new Properties();
- app_properties.put("general.internal.delim", ":::");
- app_properties.put("general.data.delim", ",");
- app_properties.put("general.collection.delim", "=");
- app_properties.put("general.transfer.delim", "&&&");
- app_properties.put("general.data.dateformat", "yyyy-MM-dd");
- app_properties.put("general.logging.packets", "false");
- app_properties.put("general.logging.responses", "false");
- properties.put("app", app_properties);
-
- Properties stream_properties = new Properties();
- stream_properties.put("general.consumer.types", "null");
- stream_properties.put("general.producer.types", "socket_producer");
- stream_properties.put("rest.socket.address", "DataEngine");
- //stream_properties.put("rest.socket.address", "localhost");
- stream_properties.put("rest.socket.port", "61100");
- stream_properties.put("rest.socket.key", "rest-key-reserved");
- stream_properties.put("output.socket.address", "RestApp");
- // stream_properties.put("output.socket.address", "localhost");
- stream_properties.put("output.socket.port", "61200");
- stream_properties.put("local.stream.type", "mongo_db");
- //stream_properties.put("local.stream.type", "null");
- stream_properties.put("mongodb.properties.uri", "mongodb://MONGO:27017");
- //stream_properties.put("mongodb.properties.uri", "mongodb://localhost:27017");
- stream_properties.put("mongodb.database.state", "main-state-db");
- stream_properties.put("mongodb.database.main", "main-db");
- stream_properties.put("mongodb.auth.collection", "auth-collection");
- stream_properties.put("mongodb.query.delim", ",");
- stream_properties.put("polygon.request.delim", "-");
- properties.put("stream", stream_properties);
-
- Properties testing_properties = new Properties();
- testing_properties.put("lsh.authorized", "true");
- testing_properties.put("lsh.ready", "true");
- properties.put("testing", testing_properties);
-}
-
- public static final Properties getProperties(String name) {
- validate(name);
- return properties.get(name);
- }
-
- public static final String getProperty(String name, String property) {
- validate(name, property);
- return properties.get(name).getProperty(property);
- }
-
- public static final void setProperty(String name, String property, String value) {
- validate(name, property);
- properties.get(name).setProperty(property, value);
- }
-
- public static final void validate(String name, String... keys) {
- if(!properties.containsKey(name)) {
- new IllegalArgumentException(String.format("Property file <%s> does not exist. Program terminating.", name)).printStackTrace();
- System.exit(1);
- }
-
- for(String key : keys)
- if(!properties.get(name).containsKey(key)) {
- new IllegalArgumentException(String.format("Missing property <%s> in file <%s>. Program terminating.", key, name)).printStackTrace();
- System.exit(1);
- }
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java
deleted file mode 100644
index f70fa63f..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.stream.external.handler;
-
-import org.framework.router.Packet;
-import org.framework.router.Response;
-import org.framework.router.ResponseFactory;
-import org.framework.router.Router;
-
-public final class ExternalStreamHandler extends Router {
-
- private final ExternalStreamManager manager;
-
- public ExternalStreamHandler() {
- super("external_stream_handler", "ESH");
-
- manager = new ExternalStreamManager(this);
- }
-
- // type: type of data
- public Response processEXSR(Packet packet) {
- String validate;
- if((validate = packet.validate("type")) != null)
- return ResponseFactory.response500("ExternalStreamHandler", validate);
-
- return ResponseFactory.response200(String.format("%s", manager.containsType(packet.getData("type"))));
- }
-
- // type: type of data
- // url_path (opt): path of the url
- // properties (opt):properties required for call
- // headers (opt): headers required for call
- public Response processRQST(Packet packet) {
- String validate;
- if((validate = packet.validate("type")) != null)
- return ResponseFactory.response500("ExternalStreamHandler", validate);
-
- // validate type exists
- if(!manager.containsType(packet.getData("type")))
- return ResponseFactory.response420(packet.getData("type"));
-
- Object[] response;
-
- // check to see if dated
- // if not
- if((validate = packet.validate("start_date", "end_date")) != null)
- response = manager.request(packet.getData("type"), packet.getData());
-
- // if dated
- else
- response = manager.request(packet.getData("type"), packet.getData(), packet.getData("start_date"), packet.getData("end_date"));
-
- // check to see if valid
- if(!((boolean)response[0])) {
- return ResponseFactory.response427(packet.getData("type"), response[1].toString());
- }
-
- // return valid
- return ResponseFactory.response200();
- }
-}
\ No newline at end of file
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java
deleted file mode 100644
index 3f66083d..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManager.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.stream.external.handler;
-
-import java.util.HashMap;
-import java.util.TreeMap;
-
-import org.stream.external.requests.ExternalRequestFramework;
-import org.stream.external.requests.ExternalRequestManager;
-
-public class ExternalStreamManager {
-
- private final ExternalStreamHandler handler;
- private final ExternalRequestManager manager;
-
- protected ExternalStreamManager(ExternalStreamHandler handler) {
- this.handler = handler;
- this.manager = new ExternalRequestManager();
-
- // initialize all available connections
- try {
- this.manager.initialize(this);
- } catch(Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- public boolean containsType(String type) {
- return manager.hasRequestFormat(type);
- }
-
- protected Object[] request(String type, HashMap data) {
- return request(type, data, null, null);
- }
-
- protected Object[] request(String type, HashMap data, String startDate, String endDate) {
- // validate that type exists
- if(!manager.hasRequestFormat(type))
- return new Object[]{false, String.format("Missing request type <%s>", type)};
-
- // parse data into required formatting
- // retrieve url path
- String[] url_path;
- if(!data.containsKey("url_path")) {
- url_path = new String[] {};
- } else {
- url_path = data.get("url_path").split(",");
- }
-
- // retrieve properties
- HashMap properties = new HashMap();
- TreeMap user_properties = new TreeMap();
- if(data.containsKey("properties")) {
- String[] raw_properties = data.get("properties").split(",");
- if(raw_properties.length % 2 != 0)
- return new Object[] {false, String.format("Properties must be in pairs.")};
-
- for(int i = 0; i < raw_properties.length; i+=2) {
- properties.put(raw_properties[i], raw_properties[i + 1]);
- user_properties.put(raw_properties[i], raw_properties[i + 1]);
- }
- }
-
- // retrieve headers
- HashMap headers = new HashMap();
- if(data.containsKey("headers")) {
- String[] raw_headers = data.get("headers").split(",");
- if(raw_headers.length % 2 != 0)
- return new Object[] {false, String.format("Headers must be in pairs.")};
-
- for(int i = 0; i < raw_headers.length; i+=2)
- headers.put(raw_headers[i], raw_headers[i + 1]);
- }
-
- // retrieve request framework
- ExternalRequestFramework request = manager.getRequestFormat(type);
-
- // submit response
- String response;
- if(startDate == null || endDate == null)
- response = request.request(url_path, properties, headers, user_properties);
- else
- response = request.request(url_path, properties, headers, startDate, endDate, user_properties);
-
- if(response != null)
- return new Object[] {false, response};
-
- return new Object[] {true, ""};
- }
-
- public void processRequest(String collection, HashMap data) {
- // invalid hashmap
- if(data == null)
- return;
-
- // if empty then submit blank push
- if(data.isEmpty()) {
- handler.send("LSH", "PUSH", "collection", collection, "data", "<<>>");
- return;
- }
-
- StringBuilder sb = new StringBuilder();
- for(String key : data.keySet())
- sb.append(key.replaceAll(",", ".") + "," + data.get(key).replaceAll(",", ".") + ",");
- sb.delete(sb.length() - 1, sb.length());
- handler.send("LSH", "PUSH", "collection", collection, "data", sb.toString());
- }
-}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java
deleted file mode 100644
index ab0df95e..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/handler/ExternalStreamManagerDeprecated.java
+++ /dev/null
@@ -1,400 +0,0 @@
-package org.stream.external.handler;
-//package org.stream.external.handler;
-//
-//import java.lang.reflect.InvocationTargetException;
-//import java.time.LocalDate;
-//import java.time.format.DateTimeFormatter;
-//import java.util.HashMap;
-//import java.util.Set;
-//
-//import org.core.logger.Logger;
-//import org.framework.router.Response;
-//import org.properties.Config;
-//import org.reflections.Reflections;
-//
-///**
-// * The {@link ExternalStreamManager} is a class which handles all
-// * external stream connections and requests. This class contains
-// * the functionality to reflect all {@link ExternalStreamConnection}
-// * templates stored in {@code org.stream.external.connected.connections}
-// * and create streams based on their parameters.
-// *
-// * All subprocesses sent to the {@link ExternalStreamHandler} interact with this
-// * class and are documented as such. All {@link org.framework.router.Response} objects are created
-// * in the {@link ExternalStreamHandler}, as this class returns objects that can
-// * be interpreted into responses. Please view {@link ExternalStreamHandler} for
-// * more information regarding the processes.
-// *
-// * @author Conor Flynn
-// */
-//public class ExternalStreamManager {
-//
-// private final ExternalStreamHandler handler;
-// private final HashMap> templates;
-// private final HashMap streams;
-//
-// /**
-// * Creates a new {@link ExternalStreamManager} object. Initializes the required
-// * variables and reflects all classes stored in
-// * {@code org.stream.external.connected.connections}. This constructor is called from
-// * the {@link ExternalStreamHandler} and should not be initialized from any other point.
-// *
-// * @param handler {@link ExternalStreamHandler} object that the new {@link ExternalStreamManager}
-// * is initialized by.
-// */
-// protected ExternalStreamManager(ExternalStreamHandler handler) {
-// this.handler = handler;
-//
-// templates = new HashMap>();
-// streams = new HashMap();
-//
-// // initialize all available connections through reflections
-// try {
-// reflect();
-// } catch (Exception e) {
-// e.printStackTrace();
-// System.exit(1);
-// }
-// }
-//
-// /**
-// * Private function which utilizes the {@code org.reflections} library to reflect
-// * all classes stored in {@code org.stream.external.connected.connections}.
-// *
-// * All thrown exceptions are from the reflections library. For more documentation please
-// * go to the following link: https://github.com/ronmamo/reflections
-// */
-// private void reflect() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
-// Reflections reflection = new Reflections("org.stream.external.connected.connections");
-// Set> types = reflection.getSubTypesOf(ExternalStreamConnection.class);
-// for(Class extends ExternalStreamConnection> c : types)
-// templates.put(c.getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, new HashMap()).getUUID(), c);
-// }
-//
-// /**
-// * Function used to determine the hash of given {@code data} using an existing template's
-// * hashing function. Primarily used to predetermine if a stream with the given hash already
-// * exists in the system so that streams with the same credentials do not get duplicated.
-// *
-// * @param template Type referring to the UUID of the template found in {@link ExternalStreamConnection#getUUID()}.
-// * @param data Data of the stream used for the authorization of the stream and for the random generation of
-// * {@link ExternalStreamConnection#getHash()}. Data should be formatted exactly as specified in the documentation otherwise the
-// * stream will be unable to authorize.
-// * @return String containing the hashed {@code data}.
-// */
-// protected String getHash(String template, HashMap data) {
-// if(!templates.containsKey(template))
-// return null;
-//
-// try {
-// return templates.get(template).getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, new HashMap()).getHash(data);
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-//
-// return null;
-// }
-//
-// /**
-// * Determines if the given template was reflected on initialization. View
-// * {@link ExternalStreamHandler} for more information on reflection.
-// *
-// * @param type Type referring to the UUID of the template found in {@link ExternalStreamConnection#getUUID()}.
-// * @return Boolean determining if the UUID exists within the manager.
-// */
-// protected boolean containsTemplate(String type) {
-// return templates.containsKey(type);
-// }
-//
-// /**
-// * Determines if a stream with the given hash exists in the manager. Hashes
-// * are generated on initialization and should be stored for future stream references.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if a stream with the given hash exists within the manager.
-// */
-// protected boolean containsStream(String hash) {
-// return streams.containsKey(hash);
-// }
-//
-// /**
-// * Method for retrieving UUID of stream with the given key.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return UUID of the stream with the given hash.
-// */
-// protected String getStreamType(String hash) {
-// if(!containsStream(hash))
-// return null;
-//
-// return streams.get(hash).getUUID();
-// }
-//
-// /**
-// * Determines if a stream with the given hash has been successfully authorized.
-// *
-// * If a stream with the given hash does not exist, the function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if a stream with the given hash has been successfully authorized.
-// */
-// protected boolean isStreamAuthorized(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// return streams.get(hash).isAuthorized();
-// }
-//
-// /**
-// * Determines if a stream with the given hash is ready for deployment or a static request.
-// *
-// * If a stream with the given hash does not exist, the function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if a stream with the given hash is ready for deployment or static requests.
-// */
-// protected boolean isStreamReady(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// return streams.get(hash).isReady();
-// }
-//
-// /**
-// * Determines if a stream with the given hash is currently active. Active streams have been successfully
-// * executed through the {@link ExternalStreamConnection#start()} function.
-// *
-// * If a stream with the given hash does not exist, the function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if a stream with the given hash is currently active.
-// */
-// protected boolean isStreamActive(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// return streams.get(hash).isActive();
-// }
-//
-// /**
-// * Adds a new stream of the given type to the manager. New streams types are generated from the
-// * reflection of {@code org.stream.external.connected.connections} package. The {@code type} parameter
-// * refers to the return of the {@link ExternalStreamConnection#getUUID()} function.
-// *
-// * After initialization, the manager will attempt to authorize the stream using the data passed in the
-// * {@code data} parameter. If failed, the method will return {@code false}.
-// *
-// * @param type Type of the stream the user wants to initialize. See {@link ExternalStreamConnection#getUUID()} for more information.
-// * @param data Data of the stream used for the authorization of the stream and for the random generation of
-// * {@link ExternalStreamConnection#getHash()}. Data should be formatted exactly as specified in the documentation otherwise the
-// * stream will be unable to authorize.
-// * @return The function returns an {@link Object} array containing 2 objects. The first is a {@link Boolean} that determines if
-// * the action was successful. The second object will return a {@link String} which contains the generated hash of the new stream.
-// * If the initialization is unsuccessful, the second object will be {@code null}.
-// */
-// protected Object[] addStream(String type, HashMap data) {
-// if(!templates.containsKey(type))
-// return new Object[] {false, null};
-//
-// ExternalStreamConnection stream = null;
-// try {
-// stream = templates.get(type).getDeclaredConstructor(ExternalStreamManager.class, HashMap.class).newInstance(this, data);
-// streams.put(stream.getHash(), stream);
-// } catch (Exception e) {
-// e.printStackTrace();
-// System.exit(1);
-// }
-//
-// if(stream == null)
-// return new Object[] {false, null};
-//
-// return new Object[] {true, stream.getHash()};
-// }
-//
-// /**
-// * Removes a stream with the given has from the manager. This function is currently deprecated and not used
-// * however future implementations will include usage for it.
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if the removal was successful.
-// */
-// protected boolean removeStream(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// streams.remove(hash);
-// return true;
-// }
-//
-// /**
-// * Authorizes a stream for execution. Uses the {@code data} passed by the {@link ExternalStreamManager#addStream(String, String)}
-// * function. That data is then processed in the {@link ExternalStreamConnection#authorize()} function to determine if authorization
-// * is successful.
-// *
-// * This function is explicitly called in {@link ExternalStreamManager#addStream(String, String)}. Failure to authorize successfully
-// * as determined by {@link ExternalStreamConnection#isAuthorized()} will prevent the new stream from being added.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if the stream with the passed hash was successfully authorized.
-// */
-// protected boolean authorizeStream(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// ExternalStreamConnection stream = streams.get(hash);
-// stream.authorize();
-// return stream.isAuthorized();
-// }
-//
-// /**
-// * Determines if a stream with the given hash contains the given subscription type.
-// * Utilizes the {@link ExternalStreamConnection#containsSubscriptionType(String)} for
-// * determining if the subscription exists.
-// *
-// * If a stream with the given hash does not exist, this function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param type Type of subscription requested.
-// * @return Boolean determining if the stream with the given hash contains the given subscription type.
-// */
-// protected boolean containsSubscriptionType(String hash, String type) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// return streams.get(hash).containsSubscriptionType(type);
-// }
-//
-// /**
-// * Subscribes the stream to the given subscription type passed in the {@code data}
-// * parameter. Subscriptions are live data feeds that push to the output handler
-// * class. From there they are distributed to the according external sources.
-// *
-// * If a stream with the given hash does not exist, this function returns false.
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param data Data required for processing the new subscription.
-// * @return The function returns an {@link Object} array containing 2 objects. The first is a {@link Boolean} that determines if
-// * the action was successful. The second item is a {@link String} containing any irregular message given when attempting to subscribe
-// * to the new subscription. If the action is successful and the first item is true, the second object is null and is not used in the
-// * given response.
-// */
-// protected Object[] subscribe(String hash, String data) {
-// if(!streams.containsKey(hash))
-// return new Object[] {false, null};
-//
-// return streams.get(hash).subscribe(data);
-// }
-//
-// /**
-// * Determines if a stream with the given hash contains the given request type.
-// * Utilizes the {@link ExternalStreamConnection#containsRequestType(String)} for
-// * determining if the subscription exists.
-// *
-// * If a stream with the given hash does not exist, this function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param type Type of request requested.
-// * @return Boolean determining if the stream with the given hash contains the given request type.
-// */
-// protected boolean containsRequestType(String hash, String type) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// return streams.get(hash).containsRequestType(type);
-// }
-//
-// /**
-// * Sends a data request from the stream with the given hash. This request is in the form of a single
-// * (typically REST API) request, which will then return a series of data presented.
-// *
-// * If a stream with the given hash does not exist, this function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param destination Destination of the request to be processed by the {@link ExternalStreamManager#process(String, String, String)} function.
-// * @param request Request data used for processing the single request.
-// * @return Returns a string object containing all data returned by the request.
-// */
-// protected Object[] request(String hash, HashMap request) {
-// if(!streams.containsKey(hash))
-// return new Object[] {false, null};
-//
-// ExternalStreamConnection stream = streams.get(hash);
-// if(!stream.isAuthorized() || !stream.isReady())
-// return new Object[] {false, null};
-//
-// return stream.request(request);
-// }
-//
-// /**
-// * Executes a stream to start processing live data. Live data subscriptions must be called through
-// * {@link ExternalStreamManager#subscribe(String, String)} which will then add a new data subscription
-// * to the stream.
-// *
-// * If a stream with the given hash does not exist, is not authorized, is not ready, or is already
-// * executed, this function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if the stream execution is successful.
-// */
-// protected boolean executeStream(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// ExternalStreamConnection stream = streams.get(hash);
-// if(!stream.isAuthorized() || !stream.isReady() || stream.isActive())
-// return false;
-//
-// return stream.start();
-// }
-//
-// /**
-// * Kills a currently active stream. This function will terminate any connection to the external stream
-// * and will immediately stop sending data to the output service. Even if the stream is unable to be killed,
-// * the connection between the data and the output service will be severed.
-// *
-// * If a stream with the given hash does not exist or is not active, this function returns false.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @return Boolean determining if the stream was successfully killed.
-// */
-// protected boolean killStream(String hash) {
-// if(!streams.containsKey(hash))
-// return false;
-//
-// ExternalStreamConnection stream = streams.get(hash);
-// if(!stream.isActive())
-// return false;
-//
-// return stream.stop();
-// }
-//
-// /**
-// * Function used for processing external data and sending it to the output handler.
-// * Uses the protocol {@code EDAT} for processing external data.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param subscription Subscription which the data was received by.
-// * @param data Data sent by the given subscription.
-// */
-// private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Config.getProperty("app", "general.data.dateformat"));
-// protected void processSubscription(String hash, String subscription, String data) {
-// // define subscribed date
-// String date = LocalDate.now().format(formatter);
-// String collection = subscription + Config.getProperty("app", "general.collection.delim") + date;
-// Response lsh_response = handler.send("LSH", "PUSH", "data", data, "collection", collection);
-// if(lsh_response.code() != 200)
-// Logger.warn(lsh_response);
-// }
-//
-// /**
-// * Function used for processing external data and sending it to the output handler.
-// * Uses the protocol {@code EDAT} for processing external data.
-// *
-// * @param hash Hash of the stream returned by the {@link ExternalStreamConnection#getHash(String)} function.
-// * @param request Request which the data was received by.
-// * @param data Data sent by the given subscription.
-// */
-// protected void processRequest(String collection, String data) {
-// Response lsh_response = handler.send("LSH", "PUSH", "collection", collection, "data", data);
-// if(lsh_response.code() != 200)
-// Logger.warn(lsh_response);
-// }
-//}
diff --git a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java b/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java
deleted file mode 100644
index 18d68043..00000000
--- a/DeFi-Data-Engine/DeFi Data Engine/src/main/java/org/stream/external/requests/ExternalRequestFramework.java
+++ /dev/null
@@ -1,442 +0,0 @@
-package org.stream.external.requests;
-
-import java.io.IOException;
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeParseException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.TreeMap;
-import java.util.stream.Stream;
-
-import org.core.logger.Logger;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.stream.external.handler.ExternalStreamManager;
-
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.Request.Builder;
-import okhttp3.Response;
-
-public abstract class ExternalRequestFramework {
-
- protected final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-
- protected final ExternalStreamManager manager;
-
- private String collection;
-
- private final String name;
- private String url;
- private final String[] url_path;
- private final HashMap properties;
- private final HashMap