Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05

weblogic.servlet.http
Interface WLHttpServletResponse


public interface WLHttpServletResponse


Method Summary
 Socket getSocket()
          Returns the socket associated with this HttpServletResponse.
 WritableByteChannel getWritableByteChannel()
          Returns a WritableByteChannel associated with the socket for this HttpServletResponse.
 

Method Detail

getSocket

Socket getSocket()
                 throws IOException

Returns the socket associated with this HttpServletResponse.

NOTE:

This method will force to send response header and make any response data in buffer ignored. Once this method is called, sending response via ServletOutputStream or PrintWriter from this HttpServletResponse object will get an IllegalStateException.

Returns:
socket which is associated with this HttpServletResponse.
Throws:
IOException - if error occurs when getting socket.

getWritableByteChannel

WritableByteChannel getWritableByteChannel()
                                           throws IOException

Returns a WritableByteChannel associated with the socket for this HttpServletResponse. This is to be used in conjunction with the getSocket() method in order to use the java.nio package for asynchronous writing to the client. This WritableByteChannel will be a channel that can always write to the socket regardless of whether the connection has used some SSL or not.

Returns:
WriteableByteChannel
Throws:
IOException

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05