View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Chris Henson <chenson42@users.sourceforge.net>,
5    *               Eric Long <erilong@users.sourceforge.net>,
6    *               Keith Naas <knaas@users.sourceforge.net>
7    *               
8    *
9    * This library is free software; you can redistribute it and/or
10   * modify it under the terms of the GNU Lesser General Public
11   * License as published by the Free Software Foundation; either
12   * version 3 of the License, or (at your option) any later version.
13   *
14   * This library is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17   * Lesser General Public License for more details.
18   *
19   * You should have received a copy of the GNU Lesser General Public
20   * License along with this library; if not, see
21   * <http://www.gnu.org/licenses/>.
22   */
23  package org.jumpmind.symmetric.transport.handler;
24  
25  import java.io.IOException;
26  import java.io.OutputStream;
27  
28  import org.jumpmind.symmetric.model.Node;
29  import org.jumpmind.symmetric.service.IRegistrationService;
30  
31  public class RegistrationResourceHandler extends AbstractTransportResourceHandler {
32      private IRegistrationService registrationService;
33  
34      public boolean registerNode(Node node, OutputStream outputStream) throws IOException {
35          return getRegistrationService().registerNode(node, outputStream, true);
36      }
37  
38      private IRegistrationService getRegistrationService() {
39          return registrationService;
40      }
41  
42      public void setRegistrationService(IRegistrationService registrationService) {
43          this.registrationService = registrationService;
44      }
45  }