@Override public String toString() { final StringBuilder sb = new StringBuilder(64); sb.append(super.toString()); sb.append("\n\tConnected to pipe: '"); sb.append(this.pipe.getName()); sb.append('\''); return sb.toString(); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(64); sb.append(super.toString()). append("\n\tConnected to pipe: '").append(this.pipe.getName()). append('\''); return sb.toString(); }
/** * Creates a new instance of this class using the given parameters. * * @param configuration * The configuration for this component. * @param projectContext * The project context for this component. */ public PipeReader(final String pipeName) { this.pipe = Broker.INSTANCE.acquirePipe(pipeName); if (this.pipe == null) { throw new IllegalArgumentException("Failed to get Pipe with name " + pipeName); } else { if (this.logger.isDebugEnabled()) { this.logger.debug("Connected to named pipe '" + this.pipe.getName() + "'"); } } // escaping this in constructor! very bad practice! this.pipe.setPipeReader(this); }
/** * Creates a new instance of this class using the given parameters. * * @param configuration * The configuration for this component. * @param projectContext * The project context for this component. */ public PipeReader(final Configuration configuration, final IProjectContext projectContext) { super(configuration, projectContext); final String pipeNameConfig = this.configuration.getStringProperty(CONFIG_PROPERTY_NAME_PIPENAME); this.pipeName = pipeNameConfig; this.pipe = Broker.INSTANCE.acquirePipe(pipeNameConfig); if (this.pipe == null) { throw new IllegalArgumentException("Failed to get Pipe with name " + pipeNameConfig); } else { this.logger.debug("Connected to named pipe '{}'", this.pipe.getName()); } // escaping this in constructor! very bad practice! this.pipe.setPipeReader(this); }
/** * Creates a new instance of this class using the given parameters. * * @param configuration * The configuration for this component. * @param projectContext * The project context for this component. */ public PipeReader(final Configuration configuration, final IProjectContext projectContext) { super(configuration, projectContext); final String pipeNameConfig = this.configuration.getStringProperty(CONFIG_PROPERTY_NAME_PIPENAME); this.pipeName = pipeNameConfig; this.pipe = Broker.INSTANCE.acquirePipe(pipeNameConfig); if (this.pipe == null) { throw new IllegalArgumentException("Failed to get Pipe with name " + pipeNameConfig); } else { if (this.log.isDebugEnabled()) { this.log.debug("Connected to named pipe '" + this.pipe.getName() + "'"); } } // escaping this in constructor! very bad practice! this.pipe.setPipeReader(this); }