( begin auto-generated from Client_stop.xml ) Disconnects from the server. Use to shut the connection when you're finished with the Client. ( end auto-generated ) @webref client:client @brief Disconnects from the server @usage application
()
| 159 | * @usage application |
| 160 | */ |
| 161 | public void stop() { |
| 162 | if (disconnectEventMethod != null && thread != null){ |
| 163 | try { |
| 164 | disconnectEventMethod.invoke(parent, this); |
| 165 | } catch (Exception e) { |
| 166 | Throwable cause = e; |
| 167 | // unwrap the exception if it came from the user code |
| 168 | if (e instanceof InvocationTargetException && e.getCause() != null) { |
| 169 | cause = e.getCause(); |
| 170 | } |
| 171 | cause.printStackTrace(); |
| 172 | disconnectEventMethod = null; |
| 173 | } |
| 174 | } |
| 175 | if (disposeRegistered) { |
| 176 | parent.unregisterMethod("dispose", this); |
| 177 | disposeRegistered = false; |
| 178 | } |
| 179 | dispose(); |
| 180 | } |
| 181 | |
| 182 | |
| 183 | /** |
no test coverage detected