Package org.hcjf.io.net
Class NetClient<S extends NetSession,D>
- java.lang.Object
-
- org.hcjf.io.net.NetServiceConsumer<S,D>
-
- org.hcjf.io.net.NetClient<S,D>
-
- All Implemented Interfaces:
ServiceConsumer
- Direct Known Subclasses:
HttpClient,MessagesNode
public abstract class NetClient<S extends NetSession,D> extends NetServiceConsumer<S,D>
This class is a kind of net consumer that represent a client for the ip connections.- Author:
- javaito
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hcjf.io.net.NetServiceConsumer
NetServiceConsumer.DecoupledAction
-
-
Constructor Summary
Constructors Constructor Description NetClient(java.lang.String host, java.lang.Integer port, NetService.TransportLayerProtocol protocol)
-
Method Summary
Modifier and Type Method Description protected voidconnect()Put the client on the net service implementationjava.lang.StringgetHost()Returns the host where it will connect the clientabstract SgetSession()This method return the object that represent the client's session.protected voidonConnectFail()-
Methods inherited from class org.hcjf.io.net.NetServiceConsumer
addDecoupledAction, checkSession, decode, decoupleIoAction, destroySession, disconnect, encode, getName, getPort, getProtocol, getService, getShutdownFrame, getShutdownPackage, getSocketOptions, getSSLEngine, getWriteWaitForTimeout, isDecoupledIoAction, onCheckSessionError, onConnect, onConnect, onDisconnect, onDisconnect, onRead, onRead, onWrite, onWrite, setService, setWriteWaitForTimeout, write, write
-
-
-
-
Constructor Detail
-
NetClient
public NetClient(java.lang.String host, java.lang.Integer port, NetService.TransportLayerProtocol protocol)
-
-
Method Detail
-
connect
protected void connect()
Put the client on the net service implementation
-
getHost
public java.lang.String getHost()
Returns the host where it will connect the client- Returns:
- Remote host.
-
getSession
public abstract S getSession()
This method return the object that represent the client's session.- Returns:
- Client's session.
-
onConnectFail
protected void onConnectFail()
-
-