|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openorb.orb.net.AbstractSocketStreamDecorationStrategy
public abstract class AbstractSocketStreamDecorationStrategy
A abstract base class that provides exception checking and autoclosing of streams.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openorb.orb.net.SocketStreamDecorationStrategy |
---|
SocketStreamDecorationStrategy.Factory |
Constructor Summary | |
---|---|
protected |
AbstractSocketStreamDecorationStrategy()
|
Method Summary | |
---|---|
protected void |
closeStream(java.io.InputStream stream)
Closes the stream. |
protected void |
closeStream(java.io.OutputStream stream)
Closes the stream. |
java.io.InputStream |
decorate(java.net.Socket socket,
java.io.InputStream stream)
Creates a decorated InputStream . |
java.io.OutputStream |
decorate(java.net.Socket socket,
java.io.OutputStream stream)
Creates a decorated OutputStream . |
protected void |
exceptionDuringStreamClose(java.io.InputStream stream,
java.lang.Exception e)
Called when an exception is thrown during a call to closeStream . |
protected void |
exceptionDuringStreamClose(java.io.OutputStream stream,
java.lang.Exception e)
Called when an exception is thrown during a call to closeStream . |
protected java.io.InputStream |
uncheckedDecorate(java.net.Socket socket,
java.io.InputStream stream)
Creates a decorated InputStream . |
protected java.io.OutputStream |
uncheckedDecorate(java.net.Socket socket,
java.io.OutputStream stream)
Creates a decorated OutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractSocketStreamDecorationStrategy()
Method Detail |
---|
public final java.io.InputStream decorate(java.net.Socket socket, java.io.InputStream stream) throws java.io.IOException
InputStream
.
decorate
in interface SocketStreamDecorationStrategy
socket
- the source of the original streamstream
- the stream to be decorated
InputStream
.
java.io.IOException
- if an I/O error occurs while creating the socket.public final java.io.OutputStream decorate(java.net.Socket socket, java.io.OutputStream stream) throws java.io.IOException
OutputStream
.
decorate
in interface SocketStreamDecorationStrategy
socket
- the source of the original streamstream
- the stream to be decorated
OutputStream
.
java.io.IOException
- if an I/O error occurs while creating the socket.protected java.io.InputStream uncheckedDecorate(java.net.Socket socket, java.io.InputStream stream) throws java.io.IOException
InputStream
.
socket
- the source of the original streamstream
- the stream to be decorated
InputStream
.
java.io.IOException
- if an I/O error occurs while creating the socket.protected java.io.OutputStream uncheckedDecorate(java.net.Socket socket, java.io.OutputStream stream) throws java.io.IOException
OutputStream
.
socket
- the source of the original streamstream
- the stream to be decorated
OutputStream
.
java.io.IOException
- if an I/O error occurs while creating the socket.protected void closeStream(java.io.InputStream stream)
exceptionDuringStreamClose
is called.
stream
- the stream to be closedprotected void closeStream(java.io.OutputStream stream)
exceptionDuringStreamClose
is called.
stream
- the stream to be closedprotected void exceptionDuringStreamClose(java.io.InputStream stream, java.lang.Exception e)
closeStream
.
stream
- the stream the threw the exceptione
- the exception thrownprotected void exceptionDuringStreamClose(java.io.OutputStream stream, java.lang.Exception e)
closeStream
.
stream
- the stream the threw the exceptione
- the exception thrown
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |