public NotificationInterestListener( String type, String context, InterestHandler handler ) { this.Guid = System.Guid.NewGuid(); this.Type = type; this.Context = context; this.Name = this.GetType().FullName + ":" + this.Guid.ToString(); this.Handler = handler; }
public NotificationDelegateInterest( String NoteType, String Context, InterestHandler Handler ) { this.Guid = System.Guid.NewGuid(); this.Name = this.GetType().FullName + ":" + this.Guid.ToString(); this.NoteType = NoteType; this.Context = Context; this.Handler = Handler; }
public void start() { // generic face setup face_ = new Face(new TcpTransport(), new TcpTransport.ConnectionInfo(hostName)); bootstrap_ = new Bootstrap(face_); keyChain_ = bootstrap_.setupDefaultIdentityAndRoot(new Name(instanceName), new Name()); certificateName_ = bootstrap_.getDefaultCertificateName(); // class-specific start InterestHandler ih = new InterestHandler(this); prefix_ = new Name(instanceName).append(commandVerb); face_.registerPrefix(prefix_, ih, ih); // update event while (true) { face_.processEvents(); System.Threading.Thread.Sleep(5); } }