org.apache.activemq
Class ActiveMQInputStream
java.lang.Object
java.io.InputStream
org.apache.activemq.ActiveMQInputStream
- All Implemented Interfaces:
- java.io.Closeable, ActiveMQDispatcher
public class ActiveMQInputStream
- extends java.io.InputStream
- implements ActiveMQDispatcher
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ActiveMQInputStream
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
- Throws:
javax.jms.JMSException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException
dispose
public void dispose()
getJMSProperties
public java.util.Map<java.lang.String,java.lang.Object> getJMSProperties()
throws java.io.IOException
- Return the JMS Properties which where used to send the InputStream
- Returns:
- jmsProperties
- Throws:
java.io.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 java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeout
java.io.IOException
- See Also:
InputStream.read()
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
ActiveMQInputStream.ReadTimeoutException
- if a timeout was given and the first chunk of the message could not read within the timeout
java.io.IOException
- See Also:
InputStream.read(byte[], int, int)
dispatch
public void dispatch(MessageDispatch md)
- Specified by:
dispatch
in interface ActiveMQDispatcher
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2005-2012. All Rights Reserved.