public class ActiveMQInputStream extends java.io.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,
java.lang.String selector,
boolean noLocal,
java.lang.String name,
int prefetch,
long timeout) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkClosed() |
void |
close() |
void |
dispatch(MessageDispatch md) |
void |
dispose() |
java.util.Map<java.lang.String,java.lang.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() |
java.lang.String |
toString() |
public ActiveMQInputStream(ActiveMQConnection connection, ConsumerId consumerId, ActiveMQDestination dest, java.lang.String selector, boolean noLocal, java.lang.String name, int prefetch, long timeout) throws javax.jms.JMSException
javax.jms.JMSException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public void dispose()
public java.util.Map<java.lang.String,java.lang.Object> getJMSProperties() throws java.io.IOException
java.io.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 java.io.IOException
read
in class java.io.InputStream
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeoutjava.io.IOException
InputStream.read()
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeoutjava.io.IOException
InputStream.read(byte[], int, int)
public void dispatch(MessageDispatch md)
dispatch
in interface ActiveMQDispatcher
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2017. All Rights Reserved.