| | |
| | | * Start the ReplicationBroker. |
| | | * |
| | | * @param servers list of servers used |
| | | * @throws Exception : in case of errors |
| | | */ |
| | | public void start(Collection<String> servers) |
| | | throws Exception |
| | | { |
| | | /* |
| | | * Open Socket to the ReplicationServer |
| | |
| | | * @throws NumberFormatException address was invalid |
| | | * @throws IOException error during connection phase |
| | | */ |
| | | private void connect() throws NumberFormatException, IOException |
| | | private void connect() |
| | | { |
| | | ReplServerStartMessage startMsg; |
| | | |
| | |
| | | { |
| | | if (session != null) |
| | | { |
| | | session.close(); |
| | | try |
| | | { |
| | | session.close(); |
| | | } catch (IOException e) |
| | | { |
| | | // The session was already closed, just ignore. |
| | | } |
| | | session = null; |
| | | } |
| | | } |