MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / setOptions

Method setOptions

src/main/java/core/packetproxy/common/ConfigIO.java:92–113  ·  view source on GitHub ↗
(String json)

Source from the content-addressed store, hash-verified

90 }
91
92 public void setOptions(String json) throws Exception {
93 DaoHub daoHub = new Gson().fromJson(json, DaoHub.class);
94
95 Database.getInstance().dropConfigs();
96
97 for (ListenPort listenPort : daoHub.listenPortList) {
98
99 ListenPorts.getInstance().create(listenPort);
100 }
101 for (Server server : daoHub.serverList) {
102
103 Servers.getInstance().create(server);
104 }
105 for (Modification mod : daoHub.modificationList) {
106
107 Modifications.getInstance().create(mod);
108 }
109 for (SSLPassThrough passThrough : daoHub.sslPassThroughList) {
110
111 SSLPassThroughs.getInstance().create(passThrough);
112 }
113 }
114}

Callers 1

actionPerformedMethod · 0.95

Calls 7

getInstanceMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
getInstanceMethod · 0.95
dropConfigsMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected