org.apache.geronimo.messaging.io
Interface StreamManager

All Superinterfaces:
EndPoint, MsgConsProd, MsgConsumer, MsgProducer
All Known Implementing Classes:
StreamManagerImpl

public interface StreamManager
extends EndPoint

Tracks InputStream instances.

Version:
$Revision: 1.2 $ $Date: 2004/06/10 23:12:25 $

Field Summary
static String NAME
          A StreamManager is registered automatically by a Node with this name.
 
Method Summary
 Object register(InputStream anIn)
          Registers the provided InputStream.
 InputStream retrieve(Object anId)
          Retrieves the InputStream having the provided id.
 byte[] retrieveLocalNext(Object anID)
          Reads from the InputStream having the specified identifier and returns the read bytes.
 void start()
          Starts.
 void stop()
          Stops.
 
Methods inherited from interface org.apache.geronimo.messaging.EndPoint
getID
 
Methods inherited from interface org.apache.geronimo.messaging.MsgProducer
setMsgProducerOut
 
Methods inherited from interface org.apache.geronimo.messaging.MsgConsumer
getMsgConsumerOut
 

Field Detail

NAME

public static final String NAME
A StreamManager is registered automatically by a Node with this name.

See Also:
Constant Field Values
Method Detail

start

public void start()
Starts.


stop

public void stop()
Stops.


register

public Object register(InputStream anIn)
Registers the provided InputStream.

Parameters:
anIn - InputStream to be tracked.
Returns:
An opaque Object identifying this stream. It must be used to retrieve the registered stream.

retrieve

public InputStream retrieve(Object anId)
                     throws IOException
Retrieves the InputStream having the provided id.

Parameters:
anId - Identifier.
Returns:
InputStream having this id.
Throws:
IOException - Indicates that no InputStream is registered for the provided identifier.

retrieveLocalNext

public byte[] retrieveLocalNext(Object anID)
                         throws IOException
Reads from the InputStream having the specified identifier and returns the read bytes.

Parameters:
anID - InputStream identifier.
Returns:
byte block read from the InputStream identified by anID.
Throws:
IOException - Indicates than an I/O error has occured.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.