DokeosSocketOfficeConnection.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. //DokeosConverter using JODConverter - Java OpenDocument Converter
  3. //Eric Marguin <e.marguin@elixir-interactive.com>
  4. //
  5. //This library is free software; you can redistribute it and/or
  6. //modify it under the terms of the GNU Lesser General Public
  7. //License as published by the Free Software Foundation; either
  8. //version 2.1 of the License, or (at your option) any later version.
  9. //
  10. //This library is distributed in the hope that it will be useful,
  11. //but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. //Lesser General Public License for more details.
  14. //http://www.gnu.org/copyleft/lesser.html
  15. //
  16. import com.sun.star.bridge.XBridge;
  17. import com.sun.star.lang.XMultiComponentFactory;
  18. import com.sun.star.uno.XComponentContext;
  19. public class DokeosSocketOfficeConnection extends AbstractDokeosOpenOfficeConnection {
  20. public static final String DEFAULT_HOST = "localhost";
  21. public static final int DEFAULT_PORT = 8100;
  22. public DokeosSocketOfficeConnection() {
  23. this(DEFAULT_HOST, DEFAULT_PORT);
  24. }
  25. public DokeosSocketOfficeConnection(int port) {
  26. this(DEFAULT_HOST, port);
  27. }
  28. public DokeosSocketOfficeConnection(String host, int port) {
  29. super("socket,host=" + host + ",port=" + port + ",tcpNoDelay=1");
  30. }
  31. public XMultiComponentFactory getServiceManager(){
  32. return serviceManager;
  33. }
  34. public XMultiComponentFactory getRemoteServiceManager(){
  35. return serviceManager;
  36. }
  37. public XBridge getBridge(){
  38. return bridge;
  39. }
  40. public XComponentContext getComponentContext(){
  41. return componentContext;
  42. }
  43. }