Examples of LogoutResponseParser


Examples of org.jscsi.parser.logout.LogoutResponseParser

        final ProtocolDataUnit protocolDataUnit = connection.receive();

        if (!(protocolDataUnit.getBasicHeaderSegment().getParser() instanceof LogoutResponseParser)) { throw new InternetSCSIException("This PDU type (" + protocolDataUnit.getBasicHeaderSegment().getParser() + ") is not expected. "); }

        final LogoutResponseParser parser = (LogoutResponseParser) protocolDataUnit.getBasicHeaderSegment().getParser();

        if (parser.getResponse() == LogoutResponse.CONNECTION_CLOSED_SUCCESSFULLY) {
            // exception rethrow
            try {
                // FIXME: Implement Connection close
                connection.getSession().close();
            } catch (IOException e) {
View Full Code Here

Examples of org.jscsi.parser.logout.LogoutResponseParser

            case LOGIN_RESPONSE :
                return new LoginResponseParser(protocolDataUnit);
            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 :
View Full Code Here

Examples of org.jscsi.parser.logout.LogoutResponseParser

    }

    public static final ProtocolDataUnit createLogoutResponsePdu (LogoutResponse response, int initiatorTaskTag, short time2Wait, short time2Retain) {
        final ProtocolDataUnit pdu = factory.create(false, true, OperationCode.LOGOUT_RESPONSE, "None", "None");
        final BasicHeaderSegment bhs = pdu.getBasicHeaderSegment();
        final LogoutResponseParser parser = (LogoutResponseParser) bhs.getParser();
        parser.setResponse(response);
        bhs.setInitiatorTaskTag(initiatorTaskTag);
        parser.setTime2Wait(time2Wait);
        parser.setTime2Retain(time2Retain);
        return (pdu);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.