Пример #1
0
 /** 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;
   }
 }
Пример #2
0
 /** 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);
   }
 }
Пример #3
0
 /**
  * Intialize a stream.
  *
  * @param streamId A stream id <code>String</code>.
  */
 public void initialize(final String streamId) {
   server.initialize(streamId);
 }
Пример #4
0
 /**
  * Finalize the persistence of the stream.
  *
  * @param streamId A stream id <code>String</code>.
  */
 public void finalize(final String streamId) {
   server.finalizeStream(streamId);
 }
Пример #5
0
 /**
  * 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);
 }
Пример #6
0
 /**
  * Destroy a stream.
  *
  * @param streamId A stream id <code>String</code>.
  */
 public void destroy(final String streamId) {
   server.destroy(streamId);
 }
Пример #7
0
 /**
  * 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);
 }
Пример #8
0
 /**
  * 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);
 }