|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Connection<L>
Common interface, which represents any kind of connection.
| Method Summary | |
|---|---|
void |
close()
Close the Connection |
void |
configureBlocking(boolean isBlocking)
Returns the Connection mode. |
L |
getLocalAddress()
Get the connection local address |
L |
getPeerAddress()
Get the connection peer address |
Processor |
getProcessor()
Gets the default Processor, which will process Connection
I/O events. |
ProcessorSelector |
getProcessorSelector()
Gets the default ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null. |
int |
getReadBufferSize()
Get the default size of Buffers, which will be allocated for
reading data from Connection. |
StreamReader |
getStreamReader()
Get the Connection StreamReader, to read data from the
Connection. |
StreamWriter |
getStreamWriter()
Get the Connection StreamWriter, to write data to the
Connection. |
Transport |
getTransport()
Get the Transport, to which this Connection belongs to. |
int |
getWriteBufferSize()
Get the default size of Buffers, which will be allocated for
writing data to Connection. |
boolean |
isBlocking()
Sets the Connection mode. |
boolean |
isOpen()
Is Connection open and ready. |
void |
setProcessor(Processor preferableProcessor)
Sets the default Processor, which will process Connection
I/O events. |
void |
setProcessorSelector(ProcessorSelector preferableProcessorSelector)
Sets the default ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null. |
void |
setReadBufferSize(int readBufferSize)
Set the default size of Buffers, which will be allocated for
reading data from Connection. |
void |
setWriteBufferSize(int writeBufferSize)
Set the default size of Buffers, which will be allocated for
writing data to Connection. |
| Methods inherited from interface com.sun.grizzly.Readable |
|---|
read, read, read, read |
| Methods inherited from interface com.sun.grizzly.Writable |
|---|
write, write, write, write |
| Methods inherited from interface com.sun.grizzly.attributes.AttributeStorage |
|---|
getAttributes, obtainAttributes |
| Method Detail |
|---|
Transport getTransport()
Transport, to which this Connection belongs to.
Transport, to which this Connection belongs to.boolean isOpen()
Connection open and ready.
Returns true, if connection is open and ready, or false
otherwise.
void configureBlocking(boolean isBlocking)
Connection mode.
true, if Connection is operating in blocking mode, or
false otherwise.
boolean isBlocking()
Connection mode.
isBlocking - the Connection mode. true,
if Connection should operate in blocking mode, or
false otherwise.Processor getProcessor()
Processor, which will process Connection
I/O events.
If Processor is null, - then Transport will try
to get Processor using Connection's
ProcessorSelector.select(IOEvent, Connection). If
ProcessorSelector, associated withthe Connection is also
null - Transport will try to get Processor
using own settings.
Processor, which will process
Connection I/O events.void setProcessor(Processor preferableProcessor)
Processor, which will process Connection
I/O events.
If Processor is null, - then Transport will try
to get Processor using Connection's
ProcessorSelector.select(IOEvent, Connection). If
ProcessorSelector, associated withthe Connection is also
null - Transport will try to get Processor
using own settings.
preferableProcessor - the default Processor, which will
process Connection I/O events.ProcessorSelector getProcessorSelector()
ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null.
ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null.void setProcessorSelector(ProcessorSelector preferableProcessorSelector)
ProcessorSelector, which will be used to get
Processor to process Connection I/O events, in case if
this Connection's Processor is null.
preferableProcessorSelector - the default ProcessorSelector,
which will be used to get Processor to process Connection
I/O events, in case if this Connection's Processor
is null.L getPeerAddress()
L getLocalAddress()
void close()
throws IOException
Connection
close in interface Closeablejava.io.IOException, - if I/O error was detected
during Connection closing.
IOExceptionStreamReader getStreamReader()
Connection StreamReader, to read data from the
Connection.
Connection StreamReader, to read data from the
Connection.StreamWriter getStreamWriter()
Connection StreamWriter, to write data to the
Connection.
Connection StreamWriter, to write data to the
Connection.int getReadBufferSize()
Buffers, which will be allocated for
reading data from Connection.
Buffers, which will be allocated for
reading data from Connection.void setReadBufferSize(int readBufferSize)
Buffers, which will be allocated for
reading data from Connection.
readBufferSize - the default size of Buffers, which will
be allocated for reading data from Connection.int getWriteBufferSize()
Buffers, which will be allocated for
writing data to Connection.
Buffers, which will be allocated for
writing data to Connection.void setWriteBufferSize(int writeBufferSize)
Buffers, which will be allocated for
writing data to Connection.
writeBufferSize - the default size of Buffers, which will
be allocated for writing data to Connection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||