org.apache.activemq
Class ActiveMQInputStream
java.lang.Object
java.io.InputStream
org.apache.activemq.ActiveMQInputStream
- All Implemented Interfaces:
- Closeable, ActiveMQDispatcher
public class ActiveMQInputStream
- extends InputStream
- implements ActiveMQDispatcher
ActiveMQInputStream
public ActiveMQInputStream(ActiveMQConnection connection,
ConsumerId consumerId,
ActiveMQDestination dest,
String selector,
boolean noLocal,
String name,
int prefetch,
long timeout)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class InputStream
- Throws:
IOException
dispose
public void dispose()
getJMSProperties
public Map<String,Object> getJMSProperties()
throws IOException
- Return the JMS Properties which where used to send the InputStream
- Returns:
- jmsProperties
- Throws:
IOException
receive
public ActiveMQMessage receive()
throws javax.jms.JMSException,
ActiveMQInputStream.ReadTimeoutException
- Throws:
javax.jms.JMSException
ActiveMQInputStream.ReadTimeoutException
checkClosed
protected void checkClosed()
throws javax.jms.IllegalStateException
- Throws:
javax.jms.IllegalStateException
read
public int read()
throws IOException
- Specified by:
read in class InputStream
- Throws:
ActiveMQInputStream.ReadTimeoutException - if a timeout was given and the first chunk of the message could not read within the timeout
IOException- See Also:
InputStream.read()
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class InputStream
- Throws:
ActiveMQInputStream.ReadTimeoutException - if a timeout was given and the first chunk of the message could not read within the timeout
IOException- See Also:
InputStream.read(byte[], int, int)
dispatch
public void dispatch(MessageDispatch md)
- Specified by:
dispatch in interface ActiveMQDispatcher
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.