Java Code Examples for com.sun.corba.se.spi.orb.OperationFactory#compose()

The following examples show how to use com.sun.corba.se.spi.orb.OperationFactory#compose() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParserTable.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private Operation makeFSOperation() {
    Operation fschecker = new Operation() {
        public Object operate( Object value )
        {
            int giopFragmentSize = ((Integer)value).intValue() ;
            if (giopFragmentSize < ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE){
                throw wrapper.fragmentSizeMinimum( new Integer( giopFragmentSize ),
                    new Integer( ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE ) ) ;
            }

            if (giopFragmentSize % ORBConstants.GIOP_FRAGMENT_DIVISOR != 0)
                throw wrapper.fragmentSizeDiv( new Integer( giopFragmentSize ),
                        new Integer( ORBConstants.GIOP_FRAGMENT_DIVISOR ) ) ;

            return value ;
        }
    } ;

    Operation result = OperationFactory.compose( OperationFactory.integerAction(),
        fschecker ) ;
    return result ;
}
 
Example 2
Source File: ParserTable.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
private Operation makeGVOperation() {
    Operation gvHelper = OperationFactory.listAction( ".",
        OperationFactory.integerAction() ) ;
    Operation gvMain = new Operation() {
        public Object operate( Object value )
        {
            Object[] nums = (Object[])value ;
            int major = ((Integer)(nums[0])).intValue() ;
            int minor = ((Integer)(nums[1])).intValue() ;

            return new GIOPVersion( major, minor ) ;
        }
    } ;

    Operation result = OperationFactory.compose( gvHelper, gvMain );
    return result ;
}
 
Example 3
Source File: ParserTable.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example 4
Source File: ParserTable.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
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 ;
}
 
Example 5
Source File: ParserTable.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private Operation makeGVOperation() {
    Operation gvHelper = OperationFactory.listAction( ".",
        OperationFactory.integerAction() ) ;
    Operation gvMain = new Operation() {
        public Object operate( Object value )
        {
            Object[] nums = (Object[])value ;
            int major = ((Integer)(nums[0])).intValue() ;
            int minor = ((Integer)(nums[1])).intValue() ;

            return new GIOPVersion( major, minor ) ;
        }
    } ;

    Operation result = OperationFactory.compose( gvHelper, gvMain );
    return result ;
}
 
Example 6
Source File: ParserTable.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private Operation makeFSOperation() {
    Operation fschecker = new Operation() {
        public Object operate( Object value )
        {
            int giopFragmentSize = ((Integer)value).intValue() ;
            if (giopFragmentSize < ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE){
                throw wrapper.fragmentSizeMinimum( new Integer( giopFragmentSize ),
                    new Integer( ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE ) ) ;
            }

            if (giopFragmentSize % ORBConstants.GIOP_FRAGMENT_DIVISOR != 0)
                throw wrapper.fragmentSizeDiv( new Integer( giopFragmentSize ),
                        new Integer( ORBConstants.GIOP_FRAGMENT_DIVISOR ) ) ;

            return value ;
        }
    } ;

    Operation result = OperationFactory.compose( OperationFactory.integerAction(),
        fschecker ) ;
    return result ;
}
 
Example 7
Source File: ParserTable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example 8
Source File: ParserTable.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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 ;
}
 
Example 9
Source File: ParserTable.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private Operation makeGVOperation() {
    Operation gvHelper = OperationFactory.listAction( ".",
        OperationFactory.integerAction() ) ;
    Operation gvMain = new Operation() {
        public Object operate( Object value )
        {
            Object[] nums = (Object[])value ;
            int major = ((Integer)(nums[0])).intValue() ;
            int minor = ((Integer)(nums[1])).intValue() ;

            return new GIOPVersion( major, minor ) ;
        }
    } ;

    Operation result = OperationFactory.compose( gvHelper, gvMain );
    return result ;
}
 
Example 10
Source File: ParserTable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private Operation makeGVOperation() {
    Operation gvHelper = OperationFactory.listAction( ".",
        OperationFactory.integerAction() ) ;
    Operation gvMain = new Operation() {
        public Object operate( Object value )
        {
            Object[] nums = (Object[])value ;
            int major = ((Integer)(nums[0])).intValue() ;
            int minor = ((Integer)(nums[1])).intValue() ;

            return new GIOPVersion( major, minor ) ;
        }
    } ;

    Operation result = OperationFactory.compose( gvHelper, gvMain );
    return result ;
}
 
Example 11
Source File: ParserTable.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private Operation makeFSOperation() {
    Operation fschecker = new Operation() {
        public Object operate( Object value )
        {
            int giopFragmentSize = ((Integer)value).intValue() ;
            if (giopFragmentSize < ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE){
                throw wrapper.fragmentSizeMinimum( new Integer( giopFragmentSize ),
                    new Integer( ORBConstants.GIOP_FRAGMENT_MINIMUM_SIZE ) ) ;
            }

            if (giopFragmentSize % ORBConstants.GIOP_FRAGMENT_DIVISOR != 0)
                throw wrapper.fragmentSizeDiv( new Integer( giopFragmentSize ),
                        new Integer( ORBConstants.GIOP_FRAGMENT_DIVISOR ) ) ;

            return value ;
        }
    } ;

    Operation result = OperationFactory.compose( OperationFactory.integerAction(),
        fschecker ) ;
    return result ;
}
 
Example 12
Source File: ORBConfiguratorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public PropertyParser makeParser()
{
    PropertyParser parser = new PropertyParser() ;
    Operation action = OperationFactory.compose(
        OperationFactory.suffixAction(),
        OperationFactory.classAction()
    ) ;
    parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
        action, "userConfigurators", Class.class ) ;
    return parser ;
}
 
Example 13
Source File: ORBConfiguratorImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public PropertyParser makeParser()
{
    PropertyParser parser = new PropertyParser() ;
    Operation action = OperationFactory.compose(
        OperationFactory.suffixAction(),
        OperationFactory.classAction()
    ) ;
    parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
        action, "userConfigurators", Class.class ) ;
    return parser ;
}
 
Example 14
Source File: ORBConfiguratorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public PropertyParser makeParser()
{
    PropertyParser parser = new PropertyParser() ;
    Operation action = OperationFactory.compose(
        OperationFactory.suffixAction(),
        OperationFactory.classAction()
    ) ;
    parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
        action, "userConfigurators", Class.class ) ;
    return parser ;
}
 
Example 15
Source File: ParserTable.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 16
Source File: ParserTable.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 17
Source File: ParserTable.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 18
Source File: ORBConfiguratorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public PropertyParser makeParser()
{
    PropertyParser parser = new PropertyParser() ;
    Operation action = OperationFactory.compose(
        OperationFactory.suffixAction(),
        OperationFactory.classAction()
    ) ;
    parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
        action, "userConfigurators", Class.class ) ;
    return parser ;
}
 
Example 19
Source File: ParserTable.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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;
}
 
Example 20
Source File: ORBConfiguratorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public PropertyParser makeParser()
{
    PropertyParser parser = new PropertyParser() ;
    Operation action = OperationFactory.compose(
        OperationFactory.suffixAction(),
        OperationFactory.classAction()
    ) ;
    parser.addPrefix( ORBConstants.SUN_PREFIX + "ORBUserConfigurators",
        action, "userConfigurators", Class.class ) ;
    return parser ;
}