Package de.netseeker.ejoe.core

Source Code of de.netseeker.ejoe.core.InJvmProcessorFactory

/*********************************************************************
* InJvmProcessorFactory.java
* created on 22.05.2007 by netseeker
* $Id: InJvmProcessorFactory.java,v 1.3 2007/11/17 10:57:03 netseeker Exp $
* $Log: InJvmProcessorFactory.java,v $
* Revision 1.3  2007/11/17 10:57:03  netseeker
* *** empty log message ***
*
* Revision 1.2  2007/05/27 22:13:09  netseeker
* *** empty log message ***
*
* Revision 1.1  2007/05/22 22:50:45  netseeker
* added In-JVM processing mode, fixed a minor bug within the serverside detection of ADAPTER_STRATEGY_DIRECT.
*
*
* ====================================================================
*
*  Copyright 2005-2006 netseeker aka Michael Manske
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
* ====================================================================
*
* This file is part of the EJOE framework.
* For more information on the author, please see
* <http://www.manskes.de/>.
*
*********************************************************************/
package de.netseeker.ejoe.core;

import de.netseeker.ejoe.ConnectionHeader;
import de.netseeker.ejoe.EJServer;

/**
* A simple factory using the EJServerRegistry to look up an existing local
* (within the same JVM) EJServer for the given client connection header.
* It produces instances of InJvmProcessor, which are able to communicate
* directly with the ServerHandler of the found local EJServer and can be used by EJClient
* instead of a socket connection.
* @author netseeker
* @since 0.3.9.3
*/
public abstract class InJvmProcessorFactory
{
    /**
     * @param server
     * @param clientHeader
     * @return
     */
    public static InJvmProcessor createProcessor(ConnectionHeader clientHeader)
    {
        EJServerRegistry registry = EJServerRegistry.getInstance();
        EJServer server = registry.lookup();
        return new InJvmProcessor(server.getServerInfo(), clientHeader);
    }
}
TOP

Related Classes of de.netseeker.ejoe.core.InJvmProcessorFactory

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.