java.lang.Object
com.aoapps.messaging.base.AbstractSocket
com.aoapps.messaging.http.HttpSocket
- All Implemented Interfaces:
Socket,Closeable,AutoCloseable
One established connection over HTTP.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpSocket(HttpSocketContext socketContext, Identifier id, long connectTime, URL endpoint) Creates a new HTTP(S) socket. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidsendMessagesImpl(Collection<? extends Message> messages) protected voidMethods inherited from class com.aoapps.messaging.base.AbstractSocket
addSocketListener, callOnError, callOnMessages, getCloseTime, getConnectRemoteSocketAddress, getConnectTime, getId, getRemoteSocketAddress, getSocketContext, isClosed, removeSocketListener, sendMessage, sendMessages, setRemoteSocketAddress, start, toString
-
Field Details
-
PROTOCOL
- See Also:
-
ENCODING
-
READ_TIMEOUT
public static final int READ_TIMEOUTServer should normally respond within 60 seconds even if no data coming back.- See Also:
-
-
Constructor Details
-
HttpSocket
Creates a new HTTP(S) socket.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSocket- Overrides:
closein classAbstractSocket- Throws:
IOException
-
getProtocol
- Specified by:
getProtocolin interfaceSocket- Specified by:
getProtocolin classAbstractSocket
-
startImpl
protected void startImpl(Callback<? super Socket> onStart, Callback<? super Throwable> onError) throws IllegalStateException - Specified by:
startImplin classAbstractSocket- Throws:
IllegalStateException
-
sendMessagesImpl
- Specified by:
sendMessagesImplin classAbstractSocket
-
