Package freenet.clients.fcp

Examples of freenet.clients.fcp.RequestIdentifier


        }
        requestStarters.setGlobalSalt(salt);
        int requestCount = ois.readInt();
        for(int i=0;i<requestCount;i++) {
            ClientRequest request = null;
            RequestIdentifier reqID = readRequestIdentifier(ois);
            if(reqID != null && context.persistentRoot.hasRequest(reqID)) {
                Logger.warning(this, "Not reading request because already have it");
                skipChecksummedObject(ois, length); // Request itself
                skipChecksummedObject(ois, length); // Recovery data
                continue;
            }
            try {
                if(!noSerialize) {
                    request = (ClientRequest) readChecksummedObject(ois, length);
                    if(request != null) {
                        if(reqID != null) {
                            if(!reqID.sameIdentifier(request.getRequestIdentifier())) {
                                Logger.error(this, "Request does not match request identifier, discarding");
                                request = null;
                            } else {
                                loaded.addPartiallyLoadedRequest(reqID, request, RequestLoadStatus.LOADED);
                            }
View Full Code Here


            Logger.error(this, "Checksum failed reading RequestIdentifier. This is not serious but means we will have to read the next request even if we don't need it.");
            return null;
        }
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buf));
        try {
            return new RequestIdentifier(dis);
        } catch (IOException e) {
            Logger.error(this, "Failed to parse RequestIdentifier in spite of valid checksum (probably a bug): "+e, e);
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of freenet.clients.fcp.RequestIdentifier

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.