Package extracells.network

Examples of extracells.network.AbstractPacket$ProtocolException


        PresentResponse_type presentResponse = (PresentResponse_type) pdu.o;
        Records_type recordsType = presentResponse.records;

        if (recordsType == null)
        {
            throw new ProtocolException("Records attribute of present-response PDU is null");
        }

        if (recordsType.which != Records_type.responserecords_CID)
        {
            // TODO: care about diagnostic records
            throw new ProtocolException("Present-response PDU does not contain response records (maybe diagnostic info)");
        }

        this.records = new ArrayList<Record>(this.numOfRecords);

        for (NamePlusRecord_type namePlusRecordType : (List<NamePlusRecord_type>) recordsType.o)
        {
            for (RecordDecoder decoder : this.association.getRecordDecoders())
            {
                if (decoder.decodes(namePlusRecordType))
                {
                    try
                    {
                        this.records.add(decoder.decode(namePlusRecordType));

                        break;
                    }
                    catch (RecordFormatException e)
                    {
                        throw new ProtocolException("Record format error while parsing present-response PDU", e);
                    }
                }
            }
        }
    }
View Full Code Here


            return toPDU(PDU_type.searchrequest_CID, searchRequest);
        }
        catch (InvalidQueryException e)
        {
            throw new ProtocolException("Invalid query: " + this.query, e);
        }
    }
View Full Code Here

                {
                    errorMessage.append(" [condition: " + diagnostics.condition + "; diagnostic: \"" + diagnostics.addinfo.o.toString() + "\"]");
                }
            }

            throw new ProtocolException(errorMessage.toString());
        }

        if (searchResponse.numberOfRecordsReturned.intValue() > 0)
        {
            // TODO: consume those
            throw new ProtocolException("Search request returned records, although none were requested");
        }

        this.numOfResults = searchResponse.resultCount.intValue();
        this.nextResult = searchResponse.nextResultSetPosition.intValue() + 1;
    }
View Full Code Here

            this.referenceId = ((initResponse.referenceId == null) ? null : new String(initResponse.referenceId));
        }
        else
        {
            throw new ProtocolException("INIT was unsuccessful; disconnecting");
        }
    }
View Full Code Here

TOP

Related Classes of extracells.network.AbstractPacket$ProtocolException

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.