|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.healthmarketscience.rmiio.RemoteOutputStreamClient
public class RemoteOutputStreamClient
Utility which provides a wrapper OutputStream for the client of a RemoteOutputStream. The wrapper will automagically handle any compression needs of the remote stream. RemoteException's will be retried using the given RemoteRetry implementation. Users should generally not need to wrap the returned stream with a BufferedOutputStream as buffering will be done by the returned implementation (unless *large* amounts of buffering are desired).
Warning, beware layering a PrintWriter or PrintStream on top of a RemoteOutputStream, as both of the aforementioned classes "swallow" IOExceptions (well, they don't swallow them, you just have to test for them). In such a scenario, a client will not detect a problem in the remote stream unless they specifically test for an error in the PrintWriter/PrintStream.
| Field Summary | |
|---|---|
static Integer |
DEFAULT_CHUNK_SIZE
default chunk size for shuffling data over the wire. |
static RemoteRetry |
DEFAULT_RETRY
The default retry policy used by this class's wrappers if none is specified by the caller. |
protected static org.apache.commons.logging.Log |
LOG
|
| Method Summary | |
|---|---|
static OutputStream |
wrap(RemoteOutputStream remoteOut)
Wraps a RemoteOutputStream as an OutputStream using the RemoteRetry.SIMPLE retry policy. |
static OutputStream |
wrap(RemoteOutputStream remoteOut,
RemoteRetry retry)
Wraps a RemoteOutputStream as an OutputStream using the given retry policy. |
static OutputStream |
wrap(RemoteOutputStream remoteOut,
RemoteRetry retry,
Integer chunkSize)
Wraps a RemoteOutputStream as an OutputStream using the given retry policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final RemoteRetry DEFAULT_RETRY
protected static final org.apache.commons.logging.Log LOG
public static final Integer DEFAULT_CHUNK_SIZE
| Method Detail |
|---|
public static OutputStream wrap(RemoteOutputStream remoteOut)
throws IOException
RemoteRetry.SIMPLE retry policy.
remoteOut - a remote output stream interface
IOException
public static OutputStream wrap(RemoteOutputStream remoteOut,
RemoteRetry retry)
throws IOException
remoteOut - a remote output stream interfaceretry - RemoteException retry policy to use, if null,
DEFAULT_RETRY will be used.
IOException
public static OutputStream wrap(RemoteOutputStream remoteOut,
RemoteRetry retry,
Integer chunkSize)
throws IOException
remoteOut - a remote output stream interfaceretry - RemoteException retry policy to use, if null,
DEFAULT_RETRY will be used.chunkSize - target value for the byte size of the packets of data
sent over the wire. note that this is a suggestion,
actual packet sizes may vary. if null,
DEFAULT_CHUNK_SIZE will be used.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||