/** Stop stream service implementation. */ private void stopImpl() { logger.logTraceId(); try { server.stop(Boolean.TRUE); } catch (final Throwable t) { throw new StreamException(t); } finally { server = null; } }
/** Start stream service implementation. */ private void startImpl() { logger.logTraceId(); try { server = new StreamServer( new File(properties.getProperty(JivePropertyNames.THINKPARITY_STREAM_ROOT)), environment); server.start(); } catch (final Throwable t) { server = null; throw new StreamException(t); } }
/** * Intialize a stream. * * @param streamId A stream id <code>String</code>. */ public void initialize(final String streamId) { server.initialize(streamId); }
/** * Finalize the persistence of the stream. * * @param streamId A stream id <code>String</code>. */ public void finalize(final String streamId) { server.finalizeStream(streamId); }
/** * Determine a stream's existence. * * @param streamId A stream id <code>String</code>. * @return True if a stream exists. */ public Boolean doesExist(final String streamId) { return server.doesExist(streamId); }
/** * Destroy a stream. * * @param streamId A stream id <code>String</code>. */ public void destroy(final String streamId) { server.destroy(streamId); }
/** * Open a stream for an upstream push. * * @param streamId A stream id <code>String</code>. * @return A <code>WritableByteChannel</code>. */ public WritableByteChannel openForUpstream(final String streamId) throws IOException { return server.openForUpstream(streamId); }
/** * Open a stream for an downstream pull. * * @param streamId A stream id <code>String</code>. * @return A <code>ReadableByteChannel</code>. */ public ReadableByteChannel openForDownstream(final String streamId) throws IOException { return server.openForDownstream(streamId); }