Package com.sap.conn.jco.server

Examples of com.sap.conn.jco.server.JCoServer


    close();
  }
 
  private void createJCoServer() {
    try {
      JCoServer jcoServer = JCoServerFactory.getServer(serverName);
      ServerErrorAndExceptionListener serverErrorAndExceptionListener = new ServerErrorAndExceptionListener();
      ServerStateChangedListener serverStateChangedListener = new ServerStateChangedListener();
      jcoServer.setCallHandlerFactory(new FunctionHandlerFactory());
      jcoServer.addServerErrorListener(serverErrorAndExceptionListener);
      jcoServer.addServerExceptionListener(serverErrorAndExceptionListener);
      jcoServer.addServerStateChangedListener(serverStateChangedListener);
      isServerInitialize = true;
    } catch (Exception e) {
      append2Console(NLS.bind(Messages.TestServerDialog_FailedToCreateServer, e.getMessage()));
      isServerInitialize = false;
    }
View Full Code Here


  private JCoServer getJCoServer() {
    try {
      if (!isServerInitialize) {
        createJCoServer();
      }
      JCoServer jcoServer = JCoServerFactory.getServer(serverName);
      jcoServer.setCallHandlerFactory(new FunctionHandlerFactory());
      return jcoServer;
    } catch (Exception e) {
      append2Console(NLS.bind(Messages.TestServerDialog_FailedToGetServer, e.getMessage()));
    }
    return null;
View Full Code Here

    }
    return null;
  }
 
  private void checkState() {
    final JCoServer jcoServer = getJCoServer();
    if (jcoServer != null) {
      try {
        getShell().getDisplay().asyncExec(new Runnable() {
          @Override
          public void run() {
            append2Console(NLS.bind(Messages.TestServerDialog_ServerState, jcoServer.getState()));
          }
        });
      } catch (Exception e) {
        // Ignore;
      }
View Full Code Here

    } catch (InterruptedException e) {
    }
  }
 
  private void startServer() {
    JCoServer jcoServer = getJCoServer();
    if (jcoServer != null) {
      try {
        jcoServer.start();
        startServerStatePoller();
      } catch (Exception e) {
        append2Console(NLS.bind(Messages.TestServerDialog_ErrorStartingServer, e.getMessage()));
      }
    }
View Full Code Here

      }
    }
  }
 
  private void stopServer() {
    JCoServer jcoServer = getJCoServer();
    if (jcoServer != null) {
      try {
        jcoServer.stop();
        stopServerStatePoller();
      } catch (Exception e) {
        append2Console(NLS.bind(Messages.TestServerDialog_ErrorStoppingServer, e.getMessage()));
      }
    }
View Full Code Here

TOP

Related Classes of com.sap.conn.jco.server.JCoServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.