public JMSBrokerBinding(URI uri, String localName, Blob authenticationId, QoSLevel[] expectedQos, UInteger priorityLevelNumber) { this.uri = uri; this.localName = localName; this.authenticationId = new Blob(JMSTransport.authId); this.expectedQos = expectedQos; this.priorityLevelNumber = priorityLevelNumber; }
@Override public void encodeNullableBlob(final Blob value) throws MALException { try { if ((null != value) && ((value.isURLBased() && (null != value.getURL())) || (!value.isURLBased() && (null != value.getValue())))) { encodeBlob(value); } else { outputStream.addBytes((byte[]) null); } } catch (IOException ex) { throw new MALException(ENCODING_EXCEPTION_STR, ex); } }
/** * Encode a blob */ @Override public void encodeBlob(final Blob value) throws MALException { byte[] byteValue = value.getValue(); encodeUInteger(new UInteger(byteValue.length)); if (value.getLength() > 0) { try { outputStream.directAdd(byteValue); } catch (IOException ex) { throw new MALException(ENCODING_EXCEPTION_STR, ex); } } }
@Override public void retrieveRangeAgainUpdateReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, org.ccsds.moims.mo.mal.structures.Blob chunk, org.ccsds.moims.mo.mal.structures.UInteger indexReceived, java.util.Map qosProperties) { int index = (int) indexReceived.getValue(); Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.INFO, "Received on rerequest! Chunk index: " + index); lastTimeReceived = System.currentTimeMillis(); try { receivedChunks.add(index, chunk.getValue()); } catch (MALException ex) { Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
/** * Returns a hash code for this object. * @return a hash code value for this object. */ public int hashCode() { int hash = 7; hash = 83 * hash + (address != null ? address.hashCode() : 0); hash = 83 * hash + (data != null ? data.hashCode() : 0); hash = 83 * hash + (checksum != null ? checksum.hashCode() : 0); return hash; }
@Override public synchronized void retrieveRangeUpdateReceived(org.ccsds.moims.mo.mal.transport.MALMessageHeader msgHeader, Blob chunk, UInteger indexReceived, java.util.Map qosProperties) { int index = (int) indexReceived.getValue(); /* Logger.getLogger(ArchiveSyncAdapter.class.getName()).log(Level.INFO, "Received! Chunk index: " + index); */ lastTimeReceived = System.currentTimeMillis(); lastknowIndex = index; try { receivedChunks.add(index, chunk.getValue()); } catch (MALException ex) { Logger.getLogger(ArchiveSyncGenAdapter.class.getName()).log(Level.SEVERE, null, ex); } }
/** * Returns a hash code for this object. * @return a hash code value for this object. */ public int hashCode() { int hash = 7; hash = 83 * hash + (network != null ? network.hashCode() : 0); hash = 83 * hash + (providerURI != null ? providerURI.hashCode() : 0); hash = 83 * hash + (objectType != null ? objectType.hashCode() : 0); hash = 83 * hash + (sourceLinkDomainId != null ? sourceLinkDomainId.hashCode() : 0); hash = 83 * hash + (sourceLinkObjectType != null ? sourceLinkObjectType.hashCode() : 0); hash = 83 * hash + (sourceLinkObjId != null ? sourceLinkObjId.hashCode() : 0); hash = 83 * hash + (relatedLink != null ? relatedLink.hashCode() : 0); hash = 83 * hash + (objectBody != null ? objectBody.hashCode() : 0); hash = 83 * hash + (objId != null ? objId.hashCode() : 0); hash = 83 * hash + (timestamp != null ? timestamp.hashCode() : 0); return hash; }
@Override public Blob decodeBlob() throws MALException { return new Blob(sourceBuffer.getBytes()); }
@Override public void encodeNullableBlob(final Blob value) throws MALException { try { if ((null != value) && ((value.isURLBased() && (null != value.getURL())) || (!value.isURLBased() && (null != value.getValue())))) { outputStream.addNotNull(); encodeBlob(value); } else { outputStream.addIsNull(); } } catch (IOException ex) { throw new MALException(ENCODING_EXCEPTION_STR, ex); } }
bis = new ByteArrayInputStream(obj.getValue()); ObjectInput in = null; try {
/** * Returns a hash code for this object. * @return a hash code value for this object. */ public int hashCode() { int hash = 7; hash = 83 * hash + (content != null ? content.hashCode() : 0); hash = 83 * hash + (creationDate != null ? creationDate.hashCode() : 0); hash = 83 * hash + (dimension != null ? dimension.hashCode() : 0); hash = 83 * hash + (format != null ? format.hashCode() : 0); return hash; }
if (! objectBody.equals(other.objectBody))
@Override public Blob decodeBlob() throws MALException { return new Blob(sourceBuffer.getBytes()); }
@Override public void encodeNullableBlob(final Blob value) throws MALException { try { if ((null != value) && ((value.isURLBased() && (null != value.getURL())) || (!value.isURLBased() && (null != value.getValue())))) { outputStream.addNotNull(); encodeBlob(value); } else { outputStream.addIsNull(); } } catch (IOException ex) { throw new MALException(ENCODING_EXCEPTION_STR, ex); } }
return Arrays.toString(((Blob) in).getValue()); } catch (MALException ex) {
if (! content.equals(other.content))