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
-
Constructor Summary
ConstructorDescriptionHttpSocket
(HttpSocketContext socketContext, Identifier id, long connectTime, URL endpoint) Creates a new HTTP(S) socket. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
sendMessagesImpl
(Collection<? extends Message> messages) protected void
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceSocket
- Overrides:
close
in classAbstractSocket
- Throws:
IOException
-
getProtocol
- Specified by:
getProtocol
in interfaceSocket
- Specified by:
getProtocol
in classAbstractSocket
-
startImpl
protected void startImpl(Callback<? super Socket> onStart, Callback<? super Throwable> onError) throws IllegalStateException - Specified by:
startImpl
in classAbstractSocket
- Throws:
IllegalStateException
-
sendMessagesImpl
- Specified by:
sendMessagesImpl
in classAbstractSocket
-