Examples of Redirector


Examples of com.sun.enterprise.web.portunif.util.Redirector

     *
     * @param protocolInfo The protocol that needs to be redirected.
     */
    public void handle(ProtocolInfo protocolInfo) throws IOException {
        if (redirector == null){
            redirector = new Redirector();
        }
       
        if (protocolInfo.protocol.equalsIgnoreCase("https")) {
            redirector.redirectSSL(protocolInfo);
        } else {
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.mux.util.Redirector

    public void run() throws Exception {
        //Setup server side mux connection
        ServerEndpoint se = getServerEndpoint();
        TestService service = new TestServiceImpl();
        int redirectPort = getPort() + 1;
        Redirector rd = new Redirector(getHost(),getPort(),redirectPort);
        ((TestServerEndpoint) se).redirect(redirectPort);
        Thread t = new Thread(rd);
        t.start();
        BasicJeriExporter exporter = new BasicJeriExporter(se,
            new BasicILFactory());
        TestService stub = (TestService) exporter.export(service);
        //Connect to the mux server
        Socket s = new Socket(getHost(),getPort());
        InputStream is = s.getInputStream();
        OutputStream os = s.getOutputStream();
        //Send client connection header
        ClientConnectionHeader cHeader = new ClientConnectionHeader();
        cHeader.send(os);
        //Receive ServerConnection header and verify format
        ServerConnectionHeader sHeader = new ServerConnectionHeader();
        try {
            sHeader.receive(is,getTimeout());
        } catch (ProtocolException e) {
            e.printStackTrace();
            throw new TestException(e.getMessage(),e);
        }
        //Make a remote call that returns something
        stub.doSomething();
        exporter.unexport(true);
        rd.stop();
        //Extract and analyze the messages sent by the mux server
        try {
            analyzeServerDataBytes(rd.getServerConversation());
        } catch (ProtocolException e) {
            e.printStackTrace();
            throw new TestException(e.getMessage(),e);
        }
                //Ping the server
View Full Code Here

Examples of jnode.logger.Redirector

    String redirectMask = MainHandler.getCurrentInstance().getProperty(
        LOGFILE, "");
    if (redirectMask.length() != 0) {
      String zipMask = MainHandler.getCurrentInstance().getProperty(
          LOGZIPPATH, "");
      new Redirector(redirectMask, zipMask).invoke();
    }
  }
View Full Code Here

Examples of org.apache.cactus.integration.api.cactify.Redirector

        boolean servletRedirectorDefined = false;
       
        // add the user defined redirectors
        for (Iterator i = this.redirectors.iterator(); i.hasNext();)
        {
            Redirector redirector = (Redirector) i.next();
            if (redirector instanceof FilterRedirector)
            {
                filterRedirectorDefined = true;
            }
            else if (redirector instanceof JspRedirector)
            {
                jspRedirectorDefined = true;
            }
            else if (redirector instanceof ServletRedirector)
            {
                servletRedirectorDefined = true;
            }
            redirector.mergeInto(theWebXml);
        }

        // now add the default redirectors if they haven't been provided by
        // the user
        if (!filterRedirectorDefined)
View Full Code Here

Examples of org.apache.cactus.integration.api.cactify.Redirector

        // add the user defined redirectors
        for (Iterator i = this.redirectors.iterator(); i.hasNext();)
        {

            Redirector redirector = (Redirector) i.next();
            if (redirector instanceof FilterRedirector)
            {
                filterRedirectorDefined = true;
            }
            else if (redirector instanceof JspRedirector)
            {
                jspRedirectorDefined = true;
            }
            else if (redirector instanceof ServletRedirector)
            {
                servletRedirectorDefined = true;
            }
            redirector.mergeInto(theWebXml);
        }

        // now add the default redirectors if they haven't been provided by
        // the user
        if (!filterRedirectorDefined)
View Full Code Here

Examples of org.apache.cocoon.environment.Redirector

        if (getLogger().isInfoEnabled()) {
            getLogger().info("Redirecting to '" + resolvedURI + "' at " + this.getLocation());
        }

        final Redirector redirector = PipelinesNode.getRedirector(env);

        if( this.global )
        {
            redirector.globalRedirect(this.createSession, resolvedURI);
        }
        else
        {
            redirector.redirect(this.createSession, resolvedURI);
        }

        return true;
    }
View Full Code Here

Examples of org.apache.cocoon.environment.Redirector

      // Perform any common invoke functionality
      super.invoke(env, context);

        // Prepare data needed by the action
        Map            objectModel    = env.getObjectModel();
        Redirector     redirector     = PipelinesNode.getRedirector(env);
        SourceResolver resolver       = getSourceResolver(objectModel);
        String         resolvedSource = source.resolve(context, objectModel);
        Parameters     resolvedParams = VariableResolver.buildParameters(this.parameters, context, objectModel);

        Map actionResult;

        // If action is ThreadSafe, avoid select() and try/catch block (faster !)
        if (this.threadSafeAction != null) {
            actionResult = this.threadSafeAction.act(
                redirector, resolver, objectModel, resolvedSource, resolvedParams );

        } else {
            Action action = (Action)this.selector.select(this.componentName);
            try {
                actionResult = action.act(
                redirector, resolver, objectModel, resolvedSource, resolvedParams );

            } finally {
                this.selector.release(action);
            }
        }

        if (redirector.hasRedirected()) {
            return true;
        }

        if (actionResult == null) {
            // Action failed
View Full Code Here

Examples of org.apache.cocoon.environment.Redirector

    public Scriptable jsFunction_callAction(String type,
                                            String source,
                                            Scriptable parameters)
        throws Exception
    {
        Redirector redirector = new SitemapRedirector(this.environment);
        SourceResolver resolver = (SourceResolver)this.environment.getObjectModel()
            .get(OBJECT_SOURCE_RESOLVER);
        ComponentManager sitemapManager = CocoonComponentManager.getSitemapComponentManager();
        ComponentSelector actionSelector
            = (ComponentSelector)sitemapManager.lookup(Action.ROLE + "Selector");
View Full Code Here

Examples of org.apache.cocoon.environment.Redirector

     */
    public final Map call(Environment env, InvokeContext context, Parameters params) throws Exception {

        // Prepare data needed by the actions
        Map            objectModel    = env.getObjectModel();
        Redirector     redirector     = PipelinesNode.getRedirector(env);
        SourceResolver resolver       = getSourceResolver(objectModel);

        String cocoonAction = env.getAction();

        Map result = null;
View Full Code Here

Examples of org.apache.cocoon.environment.Redirector

                CocoonComponentManager.enterEnvironment(environment, this.sitemapComponentManager, this);

                Map objectModel = environment.getObjectModel();

                Object oldResolver = objectModel.get(ProcessingNode.OBJECT_SOURCE_RESOLVER);
              final Redirector oldRedirector = context.getRedirector();

              // Build a redirector
              TreeProcessorRedirector redirector = new TreeProcessorRedirector(environment, context);
              setupLogger(redirector);
              context.setRedirector(redirector);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.