Interface Connection
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
AbstractConnection
,AbstractWebSocketConnection
,HttpConnection
,HttpConnectionOverHTTP
,NegotiatingClientConnection
,NegotiatingServerConnection
,SslConnection
,WebSocketClientConnection
,WebSocketServerConnection
@Deprecated(since="2021-05-27") public interface Connection extends java.io.Closeable
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A
Connection
is associated to anEndPoint
so that I/O events happening on theEndPoint
can be processed by theConnection
.A typical implementation of
Connection
overridesonOpen()
toset read interest
on theEndPoint
, and when theEndPoint
signals read readyness, thisConnection
can read bytes from the network and interpret them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Connection.Listener
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.static interface
Connection.UpgradeFrom
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.static interface
Connection.UpgradeTo
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addListener(Connection.Listener listener)
Deprecated.Adds a listener of connection events.void
close()
Deprecated.Performs a logical close of this connection.long
getBytesIn()
Deprecated.long
getBytesOut()
Deprecated.long
getCreatedTimeStamp()
Deprecated.EndPoint
getEndPoint()
Deprecated.long
getMessagesIn()
Deprecated.long
getMessagesOut()
Deprecated.void
onClose()
Deprecated.Callback method invoked when this connection is closed.boolean
onIdleExpired()
Deprecated.Callback method invoked upon an idle timeout event.void
onOpen()
Deprecated.Callback method invoked when this connection is opened.void
removeListener(Connection.Listener listener)
Deprecated.Removes a listener of connection events.
-
-
-
Method Detail
-
addListener
void addListener(Connection.Listener listener)
Deprecated.Adds a listener of connection events.
- Parameters:
listener
- the listener to add
-
removeListener
void removeListener(Connection.Listener listener)
Deprecated.Removes a listener of connection events.
- Parameters:
listener
- the listener to remove
-
onOpen
void onOpen()
Deprecated.Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
-
onClose
void onClose()
Deprecated.Callback method invoked when this connection is closed.
Creators of the connection implementation are responsible for calling this method.
-
getEndPoint
EndPoint getEndPoint()
Deprecated.- Returns:
- the
EndPoint
associated with this Connection.
-
close
void close()
Deprecated.Performs a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint
but, for example, SSL connections should write the SSL close message before closing the associatedEndPoint
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
onIdleExpired
boolean onIdleExpired()
Deprecated.Callback method invoked upon an idle timeout event.
Implementations of this method may return true to indicate that the idle timeout handling should proceed normally, typically failing the EndPoint and causing it to be closed.
When false is returned, the handling of the idle timeout event is halted immediately and the EndPoint left in the state it was before the idle timeout event.
- Returns:
- true to let the EndPoint handle the idle timeout, false to tell the EndPoint to halt the handling of the idle timeout.
-
getMessagesIn
long getMessagesIn()
Deprecated.
-
getMessagesOut
long getMessagesOut()
Deprecated.
-
getBytesIn
long getBytesIn()
Deprecated.
-
getBytesOut
long getBytesOut()
Deprecated.
-
getCreatedTimeStamp
long getCreatedTimeStamp()
Deprecated.
-
-