Java Code Examples for com.sun.corba.se.spi.transport.ReadTimeouts

The following examples show how to use com.sun.corba.se.spi.transport.ReadTimeouts. These examples are extracted from open source projects. 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 Project: jdk1.8-source-analysis   Author: raysonfang   File: TransportDefault.java    License: Apache License 2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #2
Source Project: TencentKona-8   Author: Tencent   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #3
Source Project: jdk8u60   Author: chenghanpeng   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #4
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: TransportDefault.java    License: MIT License 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #5
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #7
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #8
Source Project: hottub   Author: dsrg-uoft   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #9
Source Project: openjdk-8-source   Author: keerath   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #10
Source Project: openjdk-8   Author: bpupadhyaya   File: TransportDefault.java    License: GNU General Public License v2.0 6 votes vote down vote up
public static ReadTimeoutsFactory makeReadTimeoutsFactory()
{
    return new ReadTimeoutsFactory() {
        public ReadTimeouts create(int initial_wait_time,
                                   int max_wait_time,
                                   int max_giop_hdr_wait_time,
                                   int backoff_percent_factor)
        {
            return new ReadTCPTimeoutsImpl(
                initial_wait_time,
                max_wait_time,
                max_giop_hdr_wait_time,
                backoff_percent_factor);
        };
    };
}
 
Example #11
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: MessageBase.java    License: Apache License 2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #12
Source Project: TencentKona-8   Author: Tencent   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #13
Source Project: jdk8u60   Author: chenghanpeng   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #14
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: MessageBase.java    License: MIT License 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #15
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #16
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #17
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #18
Source Project: hottub   Author: dsrg-uoft   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #19
Source Project: openjdk-8-source   Author: keerath   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #20
Source Project: openjdk-8   Author: bpupadhyaya   File: MessageBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public static Message readGIOPBody(ORB orb,
                                   CorbaConnection connection,
                                   Message msg)
{
    ReadTimeouts readTimeouts =
                       orb.getORBData().getTransportTCPReadTimeouts();
    ByteBuffer buf = msg.getByteBuffer();

    buf.position(MessageBase.GIOPMessageHeaderLength);
    int msgSizeMinusHeader =
        msg.getSize() - MessageBase.GIOPMessageHeaderLength;
    try {
        buf = connection.read(buf,
                      GIOPMessageHeaderLength, msgSizeMinusHeader,
                      readTimeouts.get_max_time_to_wait());
    } catch (IOException e) {
        throw wrapper.ioexceptionWhenReadingConnection(e);
    }

    msg.setByteBuffer(buf);

    if (orb.giopDebugFlag) {
        dprint(".readGIOPBody: received message:");
        ByteBuffer viewBuffer = buf.asReadOnlyBuffer();
        viewBuffer.position(0).limit(msg.getSize());
        ByteBufferWithInfo bbwi = new ByteBufferWithInfo(orb, viewBuffer);
        CDRInputStream_1_0.printBuffer(bbwi);
    }

    return msg;
}
 
Example #21
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ReadTimeoutsFactory.java    License: Apache License 2.0 4 votes vote down vote up
public ReadTimeouts create(int initial_wait_time,
int max_wait_time,
int max_giop_hdr_wait_time,
int backoff_percent_factor);
 
Example #22
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: SocketOrChannelConnectionImpl.java    License: Apache License 2.0 4 votes vote down vote up
protected void setReadTimeouts(ReadTimeouts readTimeouts) {
    this.readTimeouts = readTimeouts;
}
 
Example #23
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBDataParserImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ReadTimeouts getTransportTCPReadTimeouts()
{
    return readTimeouts;
}
 
Example #24
Source Project: TencentKona-8   Author: Tencent   File: ReadTimeoutsFactory.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ReadTimeouts create(int initial_wait_time,
int max_wait_time,
int max_giop_hdr_wait_time,
int backoff_percent_factor);
 
Example #25
Source Project: TencentKona-8   Author: Tencent   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void setReadTimeouts(ReadTimeouts readTimeouts) {
    this.readTimeouts = readTimeouts;
}
 
Example #26
Source Project: TencentKona-8   Author: Tencent   File: ORBDataParserImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ReadTimeouts getTransportTCPReadTimeouts()
{
    return readTimeouts;
}
 
Example #27
Source Project: jdk8u60   Author: chenghanpeng   File: ReadTimeoutsFactory.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ReadTimeouts create(int initial_wait_time,
int max_wait_time,
int max_giop_hdr_wait_time,
int backoff_percent_factor);
 
Example #28
Source Project: jdk8u60   Author: chenghanpeng   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
protected void setReadTimeouts(ReadTimeouts readTimeouts) {
    this.readTimeouts = readTimeouts;
}
 
Example #29
Source Project: jdk8u60   Author: chenghanpeng   File: ORBDataParserImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ReadTimeouts getTransportTCPReadTimeouts()
{
    return readTimeouts;
}
 
Example #30
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ReadTimeoutsFactory.java    License: MIT License 4 votes vote down vote up
public ReadTimeouts create(int initial_wait_time,
int max_wait_time,
int max_giop_hdr_wait_time,
int backoff_percent_factor);