⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parsertable.java

📁 Mobile 应用程序使用 Java Micro Edition (Java ME) 平台
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
		TestAcceptors, TestAcceptorData, Acceptor.class ),	    //	    // Socket/Channel control	    //	    // Acceptor:	    // useNIOSelector == true	    //   useSelectThreadToWait = true	    //   useWorkerThreadForEvent = false	    // else	    //   useSelectThreadToWait = false	    //   useWorkerThreadForEvent = true	    // Connection:	    // useNIOSelector == true	    //   useSelectThreadToWait = true	    //   useWorkerThreadForEvent = true	    // else	    //   useSelectThreadToWait = false	    //   useWorkerThreadForEvent = true	    ParserDataFactory.make( ORBConstants.ACCEPTOR_SOCKET_TYPE_PROPERTY,		OperationFactory.stringAction(), 	        "acceptorSocketType", ORBConstants.SOCKETCHANNEL,		"foo", "foo" ),	    ParserDataFactory.make( ORBConstants.USE_NIO_SELECT_TO_WAIT_PROPERTY,		OperationFactory.booleanAction(), 	        "acceptorSocketUseSelectThreadToWait", Boolean.TRUE,		Boolean.TRUE, "true" ),	    ParserDataFactory.make( ORBConstants.ACCEPTOR_SOCKET_USE_WORKER_THREAD_FOR_EVENT_PROPERTY, 		OperationFactory.booleanAction(), 	        "acceptorSocketUseWorkerThreadForEvent", Boolean.TRUE,		Boolean.TRUE, "true" ),	    ParserDataFactory.make( ORBConstants.CONNECTION_SOCKET_TYPE_PROPERTY,		OperationFactory.stringAction(), 	        "connectionSocketType", ORBConstants.SOCKETCHANNEL,		"foo", "foo" ),	    ParserDataFactory.make( ORBConstants.USE_NIO_SELECT_TO_WAIT_PROPERTY,		OperationFactory.booleanAction(), 	        "connectionSocketUseSelectThreadToWait", Boolean.TRUE,		Boolean.TRUE, "true" ),	    ParserDataFactory.make( ORBConstants.CONNECTION_SOCKET_USE_WORKER_THREAD_FOR_EVENT_PROPERTY, 		OperationFactory.booleanAction(), 		"connectionSocketUseWorkerThreadForEvent", Boolean.TRUE,		Boolean.TRUE, "true" ),	    ParserDataFactory.make( ORBConstants.DISABLE_DIRECT_BYTE_BUFFER_USE_PROPERTY,		OperationFactory.booleanAction(),		"disableDirectByteBufferUse", Boolean.FALSE,		Boolean.TRUE, "true" ), 	    ParserDataFactory.make(ORBConstants.TRANSPORT_TCP_READ_TIMEOUTS_PROPERTY, 		makeTTCPRTOperation(), 		"readTimeouts",  TransportDefault.makeReadTimeoutsFactory().create(		    ORBConstants.TRANSPORT_TCP_INITIAL_TIME_TO_WAIT,		    ORBConstants.TRANSPORT_TCP_MAX_TIME_TO_WAIT,		    ORBConstants.TRANSPORT_TCP_GIOP_HEADER_MAX_TIME_TO_WAIT,		    ORBConstants.TRANSPORT_TCP_TIME_TO_WAIT_BACKOFF_FACTOR),		readTimeouts, "100:3000:300:20" ),	    ParserDataFactory.make(		ORBConstants.ENABLE_JAVA_SERIALIZATION_PROPERTY,		OperationFactory.booleanAction(), 	        "enableJavaSerialization", Boolean.FALSE,		Boolean.FALSE, "false"),	    ParserDataFactory.make(		ORBConstants.USE_REP_ID,		OperationFactory.booleanAction(), 	        "useRepId", Boolean.TRUE,		Boolean.TRUE, "true"),	    ParserDataFactory.make( ORBConstants.ORB_INIT_REF_PROPERTY,  		OperationFactory.identityAction(), 		"orbInitialReferences", new StringPair[0],		TestORBInitRefData, TestORBInitRefData, StringPair.class )	} ;	parserData = pd ;    }     public final class TestBadServerIdHandler implements BadServerIdHandler    {	public boolean equals( Object other ) 	{	    return other instanceof TestBadServerIdHandler ;	}	public void handle( ObjectKey objectKey ) 	{	}    }    private Operation makeTTCPRTOperation()    {	Operation[] fourIop = { OperationFactory.integerAction(), 	                        OperationFactory.integerAction(), 	                        OperationFactory.integerAction(), 	                        OperationFactory.integerAction() } ;	Operation op2 = OperationFactory.sequenceAction( ":", fourIop ) ;	Operation rtOp = new Operation() {	    public Object operate(Object value) 	    {		Object[] values = (Object[])value ;		Integer initialTime = (Integer)(values[0]) ;		Integer maxGIOPHdrTime = (Integer)(values[1]) ;		Integer maxGIOPBodyTime = (Integer)(values[2]) ;		Integer backoffPercent = (Integer)(values[3]) ;	        return TransportDefault.makeReadTimeoutsFactory().create(			                           initialTime.intValue(),			                           maxGIOPHdrTime.intValue(),			                           maxGIOPBodyTime.intValue(),			                           backoffPercent.intValue());	    }	} ;	Operation ttcprtOp = OperationFactory.compose(op2, rtOp);	return ttcprtOp;    }    private Operation makeUSLOperation()     {	Operation[] siop = { OperationFactory.stringAction(), 	    OperationFactory.integerAction() } ;	Operation op2 = OperationFactory.sequenceAction( ":", siop ) ;	Operation uslop = new Operation() {	    public Object operate( Object value ) 	    {		Object[] values = (Object[])value ;		String type = (String)(values[0]) ;		Integer port = (Integer)(values[1]) ;		return new USLPort( type, port.intValue() ) ;	    }	} ;		Operation op3 = OperationFactory.compose( op2, uslop ) ;	Operation listenop = OperationFactory.listAction( ",", op3 ) ;	return listenop ;    }       public static final class TestLegacyORBSocketFactory 	implements com.sun.corba.se.spi.legacy.connection.ORBSocketFactory    {	public boolean equals( Object other )	{	    return other instanceof TestLegacyORBSocketFactory ;	}	public ServerSocket createServerSocket( String type, int port )	{	    return null ;	}	public SocketInfo getEndPointInfo( org.omg.CORBA.ORB orb,	    IOR ior, SocketInfo socketInfo )	{	    return null ;	}	public Socket createSocket( SocketInfo socketInfo )	{	    return null ;	}    }    public static final class TestORBSocketFactory 	implements com.sun.corba.se.spi.transport.ORBSocketFactory    {	public boolean equals( Object other )	{	    return other instanceof TestORBSocketFactory ;	}	public void setORB(ORB orb)	{	}	public ServerSocket createServerSocket( String type, InetSocketAddress a )	{	    return null ;	}	public Socket createSocket( String type, InetSocketAddress a )	{	    return null ;	}	public void setAcceptedSocketOptions(Acceptor acceptor,					     ServerSocket serverSocket,					     Socket socket)	{	}    }    public static final class TestIORToSocketInfo	implements IORToSocketInfo    {	public boolean equals( Object other )	{	    return other instanceof TestIORToSocketInfo;	}	public List getSocketInfo(IOR ior)	{	    return null;	}    }    public static final class TestIIOPPrimaryToContactInfo	implements IIOPPrimaryToContactInfo    {	public void reset(ContactInfo primary)	{	}	public boolean hasNext(ContactInfo primary,			       ContactInfo previous,			       List contactInfos)	{	    return true;	}	public ContactInfo next(ContactInfo primary,				ContactInfo previous,				List contactInfos)	{	    return null;	}    }    public static final class TestContactInfoListFactory 	implements CorbaContactInfoListFactory    {	public boolean equals( Object other )	{	    return other instanceof TestContactInfoListFactory;	}	public void setORB(ORB orb) { }	public CorbaContactInfoList create( IOR ior ) { return null; }    }    private Operation makeMapOperation( final Map map )     {	return new Operation() {	    public Object operate( Object value ) 	    {		return map.get( value ) ;	    }	} ;    }    private Operation makeBMGROperation()    {	Map map = new HashMap() ;	map.put( "GROW", new Integer(0) ) ;	map.put( "CLCT", new Integer(1) ) ;	map.put( "STRM", new Integer(2) ) ;	return makeMapOperation( map ) ;    }    private Operation makeLegacySocketFactoryOperation()    {	Operation sfop = new Operation() {	    public Object operate( Object value ) 	    {		String param = (String)value ;		try {		    Class legacySocketFactoryClass =			ORBClassLoader.loadClass(param);		    // For security reasons avoid creating an instance if		    // this socket factory class is not one that would fail		    // the class cast anyway.		    if (com.sun.corba.se.spi.legacy.connection.ORBSocketFactory.class.isAssignableFrom(legacySocketFactoryClass)) {			return legacySocketFactoryClass.newInstance();		    } else {			throw wrapper.illegalSocketFactoryType( legacySocketFactoryClass.toString() ) ;		    }		} catch (Exception ex) {		    // ClassNotFoundException, IllegalAccessException, 		    // InstantiationException, SecurityException or 		    // ClassCastException		    throw wrapper.badCustomSocketFactory( ex, param ) ;		}	    }	} ;	return sfop ;    }        private Operation makeSocketFactoryOperation()    {	Operation sfop = new Operation() {	    public Object operate( Object value ) 	    {		String param = (String)value ;		try {		    Class socketFactoryClass = ORBClassLoader.loadClass(param);		    // For security reasons avoid creating an instance if		    // this socket factory class is not one that would fail		    // the class cast anyway.		    if (com.sun.corba.se.spi.transport.ORBSocketFactory.class.isAssignableFrom(socketFactoryClass)) {			return socketFactoryClass.newInstance();		    } else {			throw wrapper.illegalSocketFactoryType( socketFactoryClass.toString() ) ;		    }		} catch (Exception ex) {		    // ClassNotFoundException, IllegalAccessException, 		    // InstantiationException, SecurityException or 		    // ClassCastException		    throw wrapper.badCustomSocketFactory( ex, param ) ;		}	    }	} ;	return sfop ;    }        private Operation makeIORToSocketInfoOperation()    {	Operation op = new Operation() {	    public Object operate( Object value ) 	    {		String param = (String)value ;		try {		    Class iorToSocketInfoClass = ORBClassLoader.loadClass(param);		    // For security reasons avoid creating an instance if		    // this socket factory class is not one that would fail		    // the class cast anyway.		    if (IORToSocketInfo.class.isAssignableFrom(iorToSocketInfoClass)) {			return iorToSocketInfoClass.newInstance();		    } else {			throw wrapper.illegalIorToSocketInfoType( iorToSocketInfoClass.toString() ) ;		    }		} catch (Exception ex) {		    // ClassNotFoundException, IllegalAccessException, 		    // InstantiationException, SecurityException or 		    // ClassCastException		    throw wrapper.badCustomIorToSocketInfo( ex, param ) ;		}	    }	} ;	return op ;    }        private Operation makeIIOPPrimaryToContactInfoOperation()    {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -