public class ActiveMQInputStream extends InputStream implements ActiveMQDispatcher
Modifier and Type | Class and Description |
---|---|
class |
ActiveMQInputStream.ReadTimeoutException
Exception which should get thrown if the first chunk of the stream could not read within the configured timeout
|
Constructor and Description |
---|
ActiveMQInputStream(ActiveMQConnection connection,
ConsumerId consumerId,
ActiveMQDestination dest,
String selector,
boolean noLocal,
String name,
int prefetch,
long timeout) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkClosed() |
void |
close() |
void |
dispatch(MessageDispatch md) |
void |
dispose() |
Map<String,Object> |
getJMSProperties()
Return the JMS Properties which where used to send the InputStream
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
ActiveMQMessage |
receive() |
String |
toString() |
available, mark, markSupported, read, reset, skip
public ActiveMQInputStream(ActiveMQConnection connection, ConsumerId consumerId, ActiveMQDestination dest, String selector, boolean noLocal, String name, int prefetch, long timeout) throws javax.jms.JMSException
javax.jms.JMSException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public void dispose()
public Map<String,Object> getJMSProperties() throws IOException
IOException
public ActiveMQMessage receive() throws javax.jms.JMSException, ActiveMQInputStream.ReadTimeoutException
javax.jms.JMSException
ActiveMQInputStream.ReadTimeoutException
protected void checkClosed() throws javax.jms.IllegalStateException
javax.jms.IllegalStateException
public int read() throws IOException
read
in class InputStream
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeoutIOException
InputStream.read()
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeoutIOException
InputStream.read(byte[], int, int)
public void dispatch(MessageDispatch md)
dispatch
in interface ActiveMQDispatcher
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.