@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; hash = (53 * hash) + getSignature().hashCode(); hash = (37 * hash) + EVENTBYTES_FIELD_NUMBER; hash = (53 * hash) + getEventBytes().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
private void blockListen(TransactionContext transactionContext) throws CryptoException, InvalidArgumentException { this.transactionContext = transactionContext; PeerEvents.Register register = PeerEvents.Register.newBuilder() .addEvents(PeerEvents.Interest.newBuilder().setEventType(PeerEvents.EventType.BLOCK).build()).build(); PeerEvents.Event.Builder blockEventBuilder = PeerEvents.Event.newBuilder().setRegister(register) .setCreator(transactionContext.getIdentity().toByteString()) .setTimestamp(ProtoUtils.getCurrentFabricTimestamp()); if (null != clientTLSCertificateDigest) { logger.trace("Setting clientTLSCertificate digest for event registration to " + DatatypeConverter.printHexBinary(clientTLSCertificateDigest)); blockEventBuilder.setTlsCertHash(ByteString.copyFrom(clientTLSCertificateDigest)); } ByteString blockEventByteString = blockEventBuilder.build().toByteString(); PeerEvents.SignedEvent signedBlockEvent = PeerEvents.SignedEvent.newBuilder() .setEventBytes(blockEventByteString) .setSignature(transactionContext.signByteString(blockEventByteString.toByteArray())) .build(); sender.onNext(signedBlockEvent); }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
@io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Chat", requestType = org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.class, responseType = org.hyperledger.fabric.protos.peer.PeerEvents.Event.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event> getChatMethod() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event> getChatMethod; if ((getChatMethod = EventsGrpc.getChatMethod) == null) { synchronized (EventsGrpc.class) { if ((getChatMethod = EventsGrpc.getChatMethod) == null) { EventsGrpc.getChatMethod = getChatMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Events", "Chat")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.Event.getDefaultInstance())) .setSchemaDescriptor(new EventsMethodDescriptorSupplier("Chat")) .build(); } } } return getChatMethod; }
private void blockListen(TransactionContext transactionContext) throws CryptoException, InvalidArgumentException { this.transactionContext = transactionContext; PeerEvents.Register register = PeerEvents.Register.newBuilder() .addEvents(PeerEvents.Interest.newBuilder().setEventType(PeerEvents.EventType.BLOCK).build()).build(); PeerEvents.Event.Builder blockEventBuilder = PeerEvents.Event.newBuilder().setRegister(register) .setCreator(transactionContext.getIdentity().toByteString()) .setTimestamp(ProtoUtils.getCurrentFabricTimestamp()); if (null != clientTLSCertificateDigest) { logger.trace("Setting clientTLSCertificate digest for event registration to " + DatatypeConverter.printHexBinary(clientTLSCertificateDigest)); blockEventBuilder.setTlsCertHash(ByteString.copyFrom(clientTLSCertificateDigest)); } ByteString blockEventByteString = blockEventBuilder.build().toByteString(); PeerEvents.SignedEvent signedBlockEvent = PeerEvents.SignedEvent.newBuilder() .setEventBytes(blockEventByteString) .setSignature(transactionContext.signByteString(blockEventByteString.toByteArray())) .build(); sender.onNext(signedBlockEvent); }
private static io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event> getChatMethodHelper() { io.grpc.MethodDescriptor<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event> getChatMethod; if ((getChatMethod = EventsGrpc.getChatMethod) == null) { synchronized (EventsGrpc.class) { if ((getChatMethod = EventsGrpc.getChatMethod) == null) { EventsGrpc.getChatMethod = getChatMethod = io.grpc.MethodDescriptor.<org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( "protos.Events", "Chat")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.Event.getDefaultInstance())) .setSchemaDescriptor(new EventsMethodDescriptorSupplier("Chat")) .build(); } } } return getChatMethod; }
private void blockListen(TransactionContext transactionContext) throws CryptoException { this.transactionContext = transactionContext; PeerEvents.Register register = PeerEvents.Register.newBuilder() .addEvents(PeerEvents.Interest.newBuilder().setEventType(PeerEvents.EventType.BLOCK).build()).build(); PeerEvents.Event.Builder blockEventBuilder = PeerEvents.Event.newBuilder().setRegister(register) .setCreator(transactionContext.getIdentity().toByteString()) .setTimestamp(ProtoUtils.getCurrentFabricTimestamp()); if (null != clientTLSCertificateDigest) { logger.trace("Setting clientTLSCertificate digest for event registration to " + DatatypeConverter.printHexBinary(clientTLSCertificateDigest)); blockEventBuilder.setTlsCertHash(ByteString.copyFrom(clientTLSCertificateDigest)); } ByteString blockEventByteString = blockEventBuilder.build().toByteString(); PeerEvents.SignedEvent signedBlockEvent = PeerEvents.SignedEvent.newBuilder() .setEventBytes(blockEventByteString) .setSignature(transactionContext.signByteString(blockEventByteString.toByteArray())) .build(); sender.onNext(signedBlockEvent); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent other = (org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent) obj; boolean result = true; result = result && getSignature() .equals(other.getSignature()); result = result && getEventBytes() .equals(other.getEventBytes()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent)) { return super.equals(obj); } org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent other = (org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent) obj; boolean result = true; result = result && getSignature() .equals(other.getSignature()); result = result && getEventBytes() .equals(other.getEventBytes()); return result; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.getDefaultInstance(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; hash = (53 * hash) + getSignature().hashCode(); hash = (37 * hash) + EVENTBYTES_FIELD_NUMBER; hash = (53 * hash) + getEventBytes().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent getDefaultInstanceForType() { return org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.getDefaultInstance(); }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent prototype) {
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent prototype) {
public static Builder newBuilder(org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * <pre> * Marshal of Event object * </pre> * * <code>optional bytes eventBytes = 2;</code> */ public Builder clearEventBytes() { eventBytes_ = getDefaultInstance().getEventBytes(); onChanged(); return this; } public final Builder setUnknownFields(