src/share/classes/com/sun/corba/se/impl/orb/ParserTable.java

Print this page




 438                 ORBConstants.USE_REP_ID,
 439                 OperationFactory.booleanAction(),
 440                 "useRepId", Boolean.TRUE,
 441                 Boolean.TRUE, "true"),
 442             ParserDataFactory.make( ORBConstants.ORB_INIT_REF_PROPERTY,
 443                 OperationFactory.identityAction(),
 444                 "orbInitialReferences", new StringPair[0],
 445                 TestORBInitRefData, TestORBInitRefData, StringPair.class )
 446         } ;
 447 
 448         parserData = pd ;
 449     }
 450 
 451     public final class TestBadServerIdHandler implements BadServerIdHandler
 452     {
 453         public boolean equals( Object other )
 454         {
 455             return other instanceof TestBadServerIdHandler ;
 456         }
 457 




 458         public void handle( ObjectKey objectKey )
 459         {
 460         }
 461     }
 462 
 463     private Operation makeTTCPRTOperation()
 464     {
 465         Operation[] fourIop = { OperationFactory.integerAction(),
 466                                 OperationFactory.integerAction(),
 467                                 OperationFactory.integerAction(),
 468                                 OperationFactory.integerAction() } ;
 469 
 470         Operation op2 = OperationFactory.sequenceAction( ":", fourIop ) ;
 471 
 472         Operation rtOp = new Operation() {
 473             public Object operate(Object value)
 474             {
 475                 Object[] values = (Object[])value ;
 476                 Integer initialTime = (Integer)(values[0]) ;
 477                 Integer maxGIOPHdrTime = (Integer)(values[1]) ;


 501                 Object[] values = (Object[])value ;
 502                 String type = (String)(values[0]) ;
 503                 Integer port = (Integer)(values[1]) ;
 504                 return new USLPort( type, port.intValue() ) ;
 505             }
 506         } ;
 507 
 508         Operation op3 = OperationFactory.compose( op2, uslop ) ;
 509         Operation listenop = OperationFactory.listAction( ",", op3 ) ;
 510         return listenop ;
 511     }
 512 
 513     public static final class TestLegacyORBSocketFactory
 514         implements com.sun.corba.se.spi.legacy.connection.ORBSocketFactory
 515     {
 516         public boolean equals( Object other )
 517         {
 518             return other instanceof TestLegacyORBSocketFactory ;
 519         }
 520 




 521         public ServerSocket createServerSocket( String type, int port )
 522         {
 523             return null ;
 524         }
 525 
 526         public SocketInfo getEndPointInfo( org.omg.CORBA.ORB orb,
 527             IOR ior, SocketInfo socketInfo )
 528         {
 529             return null ;
 530         }
 531 
 532         public Socket createSocket( SocketInfo socketInfo )
 533         {
 534             return null ;
 535         }
 536     }
 537 
 538     public static final class TestORBSocketFactory
 539         implements com.sun.corba.se.spi.transport.ORBSocketFactory
 540     {
 541         public boolean equals( Object other )
 542         {
 543             return other instanceof TestORBSocketFactory ;
 544         }
 545 




 546         public void setORB(ORB orb)
 547         {
 548         }
 549 
 550         public ServerSocket createServerSocket( String type, InetSocketAddress a )
 551         {
 552             return null ;
 553         }
 554 
 555         public Socket createSocket( String type, InetSocketAddress a )
 556         {
 557             return null ;
 558         }
 559 
 560         public void setAcceptedSocketOptions(Acceptor acceptor,
 561                                              ServerSocket serverSocket,
 562                                              Socket socket)
 563         {
 564         }
 565     }
 566 
 567     public static final class TestIORToSocketInfo
 568         implements IORToSocketInfo
 569     {
 570         public boolean equals( Object other )
 571         {
 572             return other instanceof TestIORToSocketInfo;
 573         }
 574 




 575         public List getSocketInfo(IOR ior)
 576         {
 577             return null;
 578         }
 579     }
 580 
 581     public static final class TestIIOPPrimaryToContactInfo
 582         implements IIOPPrimaryToContactInfo
 583     {
 584         public void reset(ContactInfo primary)
 585         {
 586         }
 587 
 588         public boolean hasNext(ContactInfo primary,
 589                                ContactInfo previous,
 590                                List contactInfos)
 591         {
 592             return true;
 593         }
 594 
 595         public ContactInfo next(ContactInfo primary,
 596                                 ContactInfo previous,
 597                                 List contactInfos)
 598         {
 599             return null;
 600         }
 601     }
 602 
 603     public static final class TestContactInfoListFactory
 604         implements CorbaContactInfoListFactory
 605     {
 606         public boolean equals( Object other )
 607         {
 608             return other instanceof TestContactInfoListFactory;
 609         }
 610 




 611         public void setORB(ORB orb) { }
 612 
 613         public CorbaContactInfoList create( IOR ior ) { return null; }
 614     }
 615 
 616     private Operation makeMapOperation( final Map map )
 617     {
 618         return new Operation() {
 619             public Object operate( Object value )
 620             {
 621                 return map.get( value ) ;
 622             }
 623         } ;
 624     }
 625 
 626     private Operation makeBMGROperation()
 627     {
 628         Map map = new HashMap() ;
 629         map.put( "GROW", new Integer(0) ) ;
 630         map.put( "CLCT", new Integer(1) ) ;


 848                 Object[] nums = (Object[])value ;
 849                 int major = ((Integer)(nums[0])).intValue() ;
 850                 int minor = ((Integer)(nums[1])).intValue() ;
 851 
 852                 return new GIOPVersion( major, minor ) ;
 853             }
 854         } ;
 855 
 856         Operation result = OperationFactory.compose( gvHelper, gvMain );
 857         return result ;
 858     }
 859 
 860     public static final class TestORBInitializer1 extends org.omg.CORBA.LocalObject
 861         implements ORBInitializer
 862     {
 863         public boolean equals( Object other )
 864         {
 865             return other instanceof TestORBInitializer1 ;
 866         }
 867 




 868         public void pre_init( ORBInitInfo info )
 869         {
 870         }
 871 
 872         public void post_init( ORBInitInfo info )
 873         {
 874         }
 875     }
 876 
 877     public static final class TestORBInitializer2 extends org.omg.CORBA.LocalObject
 878         implements ORBInitializer
 879     {
 880         public boolean equals( Object other )
 881         {
 882             return other instanceof TestORBInitializer2 ;
 883         }
 884 




 885         public void pre_init( ORBInitInfo info )
 886         {
 887         }
 888 
 889         public void post_init( ORBInitInfo info )
 890         {
 891         }
 892     }
 893 
 894     private Operation makeROIOperation() {
 895         Operation clsop = OperationFactory.classAction() ;
 896         Operation indexOp = OperationFactory.suffixAction() ;
 897         Operation op1 = OperationFactory.compose( indexOp, clsop ) ;
 898         Operation mop = OperationFactory.maskErrorAction( op1 ) ;
 899 
 900         Operation mkinst = new Operation() {
 901             public Object operate( Object value )
 902             {
 903                 final Class initClass = (Class)value ;
 904                 if (initClass == null)


 933 
 934                     return initializer ;
 935                 } else {
 936                     throw wrapper.orbInitializerType( initClass.getName() ) ;
 937                 }
 938             }
 939         } ;
 940 
 941         Operation result = OperationFactory.compose( mop, mkinst ) ;
 942 
 943         return result ;
 944     }
 945 
 946     public static final class TestAcceptor1
 947         implements Acceptor
 948     {
 949         public boolean equals( Object other )
 950         {
 951             return other instanceof TestAcceptor1 ;
 952         }


 953         public boolean initialize() { return true; }
 954         public boolean initialized() { return true; }
 955         public String getConnectionCacheType() { return "FOO"; }
 956         public void setConnectionCache(InboundConnectionCache connectionCache){}
 957         public InboundConnectionCache getConnectionCache() { return null; }
 958         public boolean shouldRegisterAcceptEvent() { return true; }
 959         public void setUseSelectThreadForConnections(boolean x) { }
 960         public boolean shouldUseSelectThreadForConnections() { return true; }
 961         public void setUseWorkerThreadForConnections(boolean x) { }
 962         public boolean shouldUseWorkerThreadForConnections() { return true; }
 963         public void accept() { }
 964         public void close() { }
 965         public EventHandler getEventHandler() { return null; }
 966         public MessageMediator createMessageMediator(
 967             Broker xbroker, Connection xconnection) { return null; }
 968         public MessageMediator finishCreatingMessageMediator(
 969             Broker xbroker, Connection xconnection,
 970             MessageMediator messageMediator) { return null; }
 971         public InputObject createInputObject(
 972             Broker broker, MessageMediator messageMediator) { return null; }
 973         public OutputObject createOutputObject(
 974             Broker broker, MessageMediator messageMediator) { return null; }
 975     }
 976 
 977     public static final class TestAcceptor2
 978         implements Acceptor
 979     {
 980         public boolean equals( Object other )
 981         {
 982             return other instanceof TestAcceptor2 ;
 983         }

 984         public boolean initialize() { return true; }
 985         public boolean initialized() { return true; }
 986         public String getConnectionCacheType() { return "FOO"; }
 987         public void setConnectionCache(InboundConnectionCache connectionCache){}
 988         public InboundConnectionCache getConnectionCache() { return null; }
 989         public boolean shouldRegisterAcceptEvent() { return true; }
 990         public void setUseSelectThreadForConnections(boolean x) { }
 991         public boolean shouldUseSelectThreadForConnections() { return true; }
 992         public void setUseWorkerThreadForConnections(boolean x) { }
 993         public boolean shouldUseWorkerThreadForConnections() { return true; }
 994         public void accept() { }
 995         public void close() { }
 996         public EventHandler getEventHandler() { return null; }
 997         public MessageMediator createMessageMediator(
 998             Broker xbroker, Connection xconnection) { return null; }
 999         public MessageMediator finishCreatingMessageMediator(
1000             Broker xbroker, Connection xconnection,
1001             MessageMediator messageMediator) { return null; }
1002         public InputObject createInputObject(
1003             Broker broker, MessageMediator messageMediator) { return null; }




 438                 ORBConstants.USE_REP_ID,
 439                 OperationFactory.booleanAction(),
 440                 "useRepId", Boolean.TRUE,
 441                 Boolean.TRUE, "true"),
 442             ParserDataFactory.make( ORBConstants.ORB_INIT_REF_PROPERTY,
 443                 OperationFactory.identityAction(),
 444                 "orbInitialReferences", new StringPair[0],
 445                 TestORBInitRefData, TestORBInitRefData, StringPair.class )
 446         } ;
 447 
 448         parserData = pd ;
 449     }
 450 
 451     public final class TestBadServerIdHandler implements BadServerIdHandler
 452     {
 453         public boolean equals( Object other )
 454         {
 455             return other instanceof TestBadServerIdHandler ;
 456         }
 457 
 458         public int hashCode() {
 459             return 1;
 460         }
 461 
 462         public void handle( ObjectKey objectKey )
 463         {
 464         }
 465     }
 466 
 467     private Operation makeTTCPRTOperation()
 468     {
 469         Operation[] fourIop = { OperationFactory.integerAction(),
 470                                 OperationFactory.integerAction(),
 471                                 OperationFactory.integerAction(),
 472                                 OperationFactory.integerAction() } ;
 473 
 474         Operation op2 = OperationFactory.sequenceAction( ":", fourIop ) ;
 475 
 476         Operation rtOp = new Operation() {
 477             public Object operate(Object value)
 478             {
 479                 Object[] values = (Object[])value ;
 480                 Integer initialTime = (Integer)(values[0]) ;
 481                 Integer maxGIOPHdrTime = (Integer)(values[1]) ;


 505                 Object[] values = (Object[])value ;
 506                 String type = (String)(values[0]) ;
 507                 Integer port = (Integer)(values[1]) ;
 508                 return new USLPort( type, port.intValue() ) ;
 509             }
 510         } ;
 511 
 512         Operation op3 = OperationFactory.compose( op2, uslop ) ;
 513         Operation listenop = OperationFactory.listAction( ",", op3 ) ;
 514         return listenop ;
 515     }
 516 
 517     public static final class TestLegacyORBSocketFactory
 518         implements com.sun.corba.se.spi.legacy.connection.ORBSocketFactory
 519     {
 520         public boolean equals( Object other )
 521         {
 522             return other instanceof TestLegacyORBSocketFactory ;
 523         }
 524 
 525         public int hashCode() {
 526             return 1;
 527         }
 528 
 529         public ServerSocket createServerSocket( String type, int port )
 530         {
 531             return null ;
 532         }
 533 
 534         public SocketInfo getEndPointInfo( org.omg.CORBA.ORB orb,
 535             IOR ior, SocketInfo socketInfo )
 536         {
 537             return null ;
 538         }
 539 
 540         public Socket createSocket( SocketInfo socketInfo )
 541         {
 542             return null ;
 543         }
 544     }
 545 
 546     public static final class TestORBSocketFactory
 547         implements com.sun.corba.se.spi.transport.ORBSocketFactory
 548     {
 549         public boolean equals( Object other )
 550         {
 551             return other instanceof TestORBSocketFactory ;
 552         }
 553 
 554         public int hashCode() {
 555             return 1;
 556         }
 557 
 558         public void setORB(ORB orb)
 559         {
 560         }
 561 
 562         public ServerSocket createServerSocket( String type, InetSocketAddress a )
 563         {
 564             return null ;
 565         }
 566 
 567         public Socket createSocket( String type, InetSocketAddress a )
 568         {
 569             return null ;
 570         }
 571 
 572         public void setAcceptedSocketOptions(Acceptor acceptor,
 573                                              ServerSocket serverSocket,
 574                                              Socket socket)
 575         {
 576         }
 577     }
 578 
 579     public static final class TestIORToSocketInfo
 580         implements IORToSocketInfo
 581     {
 582         public boolean equals( Object other )
 583         {
 584             return other instanceof TestIORToSocketInfo;
 585         }
 586 
 587         public int hashCode() {
 588             return 1;
 589         }
 590 
 591         public List getSocketInfo(IOR ior)
 592         {
 593             return null;
 594         }
 595     }
 596 
 597     public static final class TestIIOPPrimaryToContactInfo
 598         implements IIOPPrimaryToContactInfo
 599     {
 600         public void reset(ContactInfo primary)
 601         {
 602         }
 603 
 604         public boolean hasNext(ContactInfo primary,
 605                                ContactInfo previous,
 606                                List contactInfos)
 607         {
 608             return true;
 609         }
 610 
 611         public ContactInfo next(ContactInfo primary,
 612                                 ContactInfo previous,
 613                                 List contactInfos)
 614         {
 615             return null;
 616         }
 617     }
 618 
 619     public static final class TestContactInfoListFactory
 620         implements CorbaContactInfoListFactory
 621     {
 622         public boolean equals( Object other )
 623         {
 624             return other instanceof TestContactInfoListFactory;
 625         }
 626 
 627         public int hashCode() {
 628             return 1;
 629         }
 630 
 631         public void setORB(ORB orb) { }
 632 
 633         public CorbaContactInfoList create( IOR ior ) { return null; }
 634     }
 635 
 636     private Operation makeMapOperation( final Map map )
 637     {
 638         return new Operation() {
 639             public Object operate( Object value )
 640             {
 641                 return map.get( value ) ;
 642             }
 643         } ;
 644     }
 645 
 646     private Operation makeBMGROperation()
 647     {
 648         Map map = new HashMap() ;
 649         map.put( "GROW", new Integer(0) ) ;
 650         map.put( "CLCT", new Integer(1) ) ;


 868                 Object[] nums = (Object[])value ;
 869                 int major = ((Integer)(nums[0])).intValue() ;
 870                 int minor = ((Integer)(nums[1])).intValue() ;
 871 
 872                 return new GIOPVersion( major, minor ) ;
 873             }
 874         } ;
 875 
 876         Operation result = OperationFactory.compose( gvHelper, gvMain );
 877         return result ;
 878     }
 879 
 880     public static final class TestORBInitializer1 extends org.omg.CORBA.LocalObject
 881         implements ORBInitializer
 882     {
 883         public boolean equals( Object other )
 884         {
 885             return other instanceof TestORBInitializer1 ;
 886         }
 887 
 888         public int hashCode() {
 889             return 1;
 890         }
 891 
 892         public void pre_init( ORBInitInfo info )
 893         {
 894         }
 895 
 896         public void post_init( ORBInitInfo info )
 897         {
 898         }
 899     }
 900 
 901     public static final class TestORBInitializer2 extends org.omg.CORBA.LocalObject
 902         implements ORBInitializer
 903     {
 904         public boolean equals( Object other )
 905         {
 906             return other instanceof TestORBInitializer2 ;
 907         }
 908 
 909         public int hashCode() {
 910             return 1;
 911         }
 912 
 913         public void pre_init( ORBInitInfo info )
 914         {
 915         }
 916 
 917         public void post_init( ORBInitInfo info )
 918         {
 919         }
 920     }
 921 
 922     private Operation makeROIOperation() {
 923         Operation clsop = OperationFactory.classAction() ;
 924         Operation indexOp = OperationFactory.suffixAction() ;
 925         Operation op1 = OperationFactory.compose( indexOp, clsop ) ;
 926         Operation mop = OperationFactory.maskErrorAction( op1 ) ;
 927 
 928         Operation mkinst = new Operation() {
 929             public Object operate( Object value )
 930             {
 931                 final Class initClass = (Class)value ;
 932                 if (initClass == null)


 961 
 962                     return initializer ;
 963                 } else {
 964                     throw wrapper.orbInitializerType( initClass.getName() ) ;
 965                 }
 966             }
 967         } ;
 968 
 969         Operation result = OperationFactory.compose( mop, mkinst ) ;
 970 
 971         return result ;
 972     }
 973 
 974     public static final class TestAcceptor1
 975         implements Acceptor
 976     {
 977         public boolean equals( Object other ) 
 978         {
 979             return other instanceof TestAcceptor1 ;
 980         }
 981 
 982         public int hashCode() { return 1; }
 983         public boolean initialize() { return true; }
 984         public boolean initialized() { return true; }
 985         public String getConnectionCacheType() { return "FOO"; }
 986         public void setConnectionCache(InboundConnectionCache connectionCache){}
 987         public InboundConnectionCache getConnectionCache() { return null; }
 988         public boolean shouldRegisterAcceptEvent() { return true; }
 989         public void setUseSelectThreadForConnections(boolean x) { }
 990         public boolean shouldUseSelectThreadForConnections() { return true; }
 991         public void setUseWorkerThreadForConnections(boolean x) { }
 992         public boolean shouldUseWorkerThreadForConnections() { return true; }
 993         public void accept() { }
 994         public void close() { }
 995         public EventHandler getEventHandler() { return null; }
 996         public MessageMediator createMessageMediator(
 997             Broker xbroker, Connection xconnection) { return null; }
 998         public MessageMediator finishCreatingMessageMediator(
 999             Broker xbroker, Connection xconnection,
1000             MessageMediator messageMediator) { return null; }
1001         public InputObject createInputObject(
1002             Broker broker, MessageMediator messageMediator) { return null; }
1003         public OutputObject createOutputObject(
1004             Broker broker, MessageMediator messageMediator) { return null; }
1005     }
1006 
1007     public static final class TestAcceptor2
1008         implements Acceptor
1009     {
1010         public boolean equals( Object other )
1011         {
1012             return other instanceof TestAcceptor2 ;
1013         }
1014         public int hashCode() { return 1; }
1015         public boolean initialize() { return true; }
1016         public boolean initialized() { return true; }
1017         public String getConnectionCacheType() { return "FOO"; }
1018         public void setConnectionCache(InboundConnectionCache connectionCache){}
1019         public InboundConnectionCache getConnectionCache() { return null; }
1020         public boolean shouldRegisterAcceptEvent() { return true; }
1021         public void setUseSelectThreadForConnections(boolean x) { }
1022         public boolean shouldUseSelectThreadForConnections() { return true; }
1023         public void setUseWorkerThreadForConnections(boolean x) { }
1024         public boolean shouldUseWorkerThreadForConnections() { return true; }
1025         public void accept() { }
1026         public void close() { }
1027         public EventHandler getEventHandler() { return null; }
1028         public MessageMediator createMessageMediator(
1029             Broker xbroker, Connection xconnection) { return null; }
1030         public MessageMediator finishCreatingMessageMediator(
1031             Broker xbroker, Connection xconnection,
1032             MessageMediator messageMediator) { return null; }
1033         public InputObject createInputObject(
1034             Broker broker, MessageMediator messageMediator) { return null; }