Package org.jscsi.parser.text

Examples of org.jscsi.parser.text.TextRequestParser


            case LOGOUT_REQUEST :
                return new LogoutRequestParser(protocolDataUnit);
            case LOGOUT_RESPONSE :
                return new LogoutResponseParser(protocolDataUnit);
            case TEXT_REQUEST :
                return new TextRequestParser(protocolDataUnit);
            case TEXT_RESPONSE :
                return new TextResponseParser(protocolDataUnit);
            case SCSI_DATA_OUT :
                return new DataOutParser(protocolDataUnit);
            case SCSI_DATA_IN :
View Full Code Here


    /** {@inheritDoc} */
    public final void execute () throws InternetSCSIException {

        final ProtocolDataUnit protocolDataUnit = protocolDataUnitFactory.create(false, true, OperationCode.TEXT_REQUEST, connection.getSetting(OperationalTextKey.HEADER_DIGEST), connection.getSetting(OperationalTextKey.DATA_DIGEST));
        final TextRequestParser parser = (TextRequestParser) protocolDataUnit.getBasicHeaderSegment().getParser();

        final SettingsMap settings = new SettingsMap();
        settings.add(OperationalTextKey.SEND_TARGETS, "");

        final IDataSegment dataSegment = DataSegmentFactory.create(settings.asByteBuffer(), DataSegmentFormat.TEXT, connection.getSettingAsInt(OperationalTextKey.MAX_RECV_DATA_SEGMENT_LENGTH));

        int bytes2Process = dataSegment.getLength();
        for (IDataSegmentIterator dataSegmentIterator = dataSegment.iterator(); dataSegmentIterator.hasNext();) {
            IDataSegmentChunk dataSegmentChunk = dataSegmentIterator.next(bytes2Process);
            protocolDataUnit.setDataSegment(dataSegmentChunk);
            parser.setTargetTransferTag(0xFFFFFFFF);
        }

        connection.send(protocolDataUnit);
        connection.nextState(new GetConnectionsResponseState(connection));
        super.stateFollowing = true;
View Full Code Here

TOP

Related Classes of org.jscsi.parser.text.TextRequestParser

Copyright © 2018 www.massapicom. 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.