Search in sources :

Example 1 with IFlattenedSolutionDebugListener

use of com.servoy.j2db.server.shared.IFlattenedSolutionDebugListener in project servoy-client by Servoy.

the class DebugClientHandler method createDebugWebClient.

/**
 * @param webClientSession
 * @param req
 * @param userName
 * @param password
 * @param method
 * @param objects
 * @return
 * @throws Exception
 */
public synchronized WebClient createDebugWebClient(WebSession webClientSession, HttpServletRequest req, WebCredentials credentials, String method, Object[] objects) throws Exception {
    if (!(webClientSession instanceof WebClientSession)) {
        // nullpointer when webClientSession is null
        throw new IllegalArgumentException("expecting WebClientSession for debug web client: " + webClientSession.getClass().getName());
    }
    IFlattenedSolutionDebugListener debugListener = null;
    if (debugWebClient != null && debugWebClient.getSolution() != null) {
        debugWebClient.shutDown(true);
    }
    if (debugWebClient != null && debugWebClient.getFlattenedSolution() != null) {
        debugListener = debugWebClient.getFlattenedSolution().getDebugListener();
    }
    debugWebClient = new DebugWebClient(req, credentials, method, objects, (currentSolution == null) ? null : currentSolution.getSolutionMetaData(), designerCallback);
    if (debugListener != null && debugWebClient.getFlattenedSolution() != null)
        debugWebClient.getFlattenedSolution().registerDebugListener(debugListener);
    return debugWebClient;
}
Also used : WebClientSession(com.servoy.j2db.server.headlessclient.WebClientSession) IDebugWebClient(com.servoy.j2db.IDebugWebClient) IFlattenedSolutionDebugListener(com.servoy.j2db.server.shared.IFlattenedSolutionDebugListener)

Example 2 with IFlattenedSolutionDebugListener

use of com.servoy.j2db.server.shared.IFlattenedSolutionDebugListener in project servoy-client by Servoy.

the class DebugClientHandler method createDebugNGClient.

public synchronized IDebugClient createDebugNGClient(Object wsSession) throws Exception {
    IFlattenedSolutionDebugListener debugListener = null;
    if (debugNGClient != null && debugNGClient.getFlattenedSolution() != null) {
        debugListener = debugNGClient.getFlattenedSolution().getDebugListener();
    }
    if (debugNGClient != null && !debugNGClient.isShutDown()) {
        debugNGClient.shutDown(true);
    }
    debugNGClient = new DebugNGClient((INGClientWebsocketSession) wsSession, designerCallback);
    if (debugListener != null && debugNGClient.getFlattenedSolution() != null)
        debugNGClient.getFlattenedSolution().registerDebugListener(debugListener);
    return debugNGClient;
}
Also used : IDebugNGClient(com.servoy.j2db.IDebugNGClient) INGClientWebsocketSession(com.servoy.j2db.server.ngclient.INGClientWebsocketSession) IFlattenedSolutionDebugListener(com.servoy.j2db.server.shared.IFlattenedSolutionDebugListener)

Aggregations

IFlattenedSolutionDebugListener (com.servoy.j2db.server.shared.IFlattenedSolutionDebugListener)2 IDebugNGClient (com.servoy.j2db.IDebugNGClient)1 IDebugWebClient (com.servoy.j2db.IDebugWebClient)1 WebClientSession (com.servoy.j2db.server.headlessclient.WebClientSession)1 INGClientWebsocketSession (com.servoy.j2db.server.ngclient.INGClientWebsocketSession)1