Package de.novanic.eventservice.service.connection.strategy.connector.streaming

Examples of de.novanic.eventservice.service.connection.strategy.connector.streaming.StreamingServerConnector$CloseException


     */
    protected void doGet(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletException, IOException {
        ConnectionStrategyServerConnector theConnectionStrategyServerConnector = myConfigurationDependentFactory.getConnectionStrategyServerConnector();
        if(theConnectionStrategyServerConnector instanceof StreamingServerConnector) {
            final String theClientId = getClientId(aRequest);
            StreamingServerConnector theStreamingServerConnector = (StreamingServerConnector)theConnectionStrategyServerConnector;
            try {
                //The streaming server connector has to be cloned, because it isn't stateless (a prepare method is required).
                theStreamingServerConnector = (StreamingServerConnector)theStreamingServerConnector.clone();
                theStreamingServerConnector.prepare(aResponse);
                listen(theStreamingServerConnector, theClientId);
            } catch(EventServiceException e) {
                throw new ServletException("Error on streaming events to the client\"" + theClientId + "\"!", e);
            } catch(CloneNotSupportedException e) {
                throw new ServletException("Error on cloning \"" + StreamingServerConnector.class.getName() + "\" for client \"" + theClientId + "\"!", e);
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.service.connection.strategy.connector.streaming.StreamingServerConnector$CloseException

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.