- java.lang.Object
-
- swim.api.service.AbstractService
-
- All Implemented Interfaces:
Service
,IpInterface
,Log
public class AbstractService extends Object implements Service, IpInterface, Log
-
-
Field Summary
Fields Modifier and Type Field Description protected ServiceContext
context
-
Constructor Summary
Constructors Constructor Description AbstractService()
AbstractService(ServiceContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IpServiceRef
bindTcp(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
IpServiceRef
bindTls(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
void
close()
IpSocketRef
connectTcp(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
IpSocketRef
connectTls(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
void
debug(Object message)
Logs a debug-level message.void
didClose()
void
didFail(Throwable error)
void
didStart()
void
didStop()
void
error(Object message)
Logs an error-level message.void
fail(Object message)
Logs an fail-level message.void
info(Object message)
Logs an info-level message.IpSettings
ipSettings()
Schedule
schedule()
ServiceContext
serviceContext()
Stage
stage()
void
trace(Object message)
Logs a trace-level message.void
warn(Object message)
Logs a warn-level message.void
willClose()
void
willStart()
void
willStop()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.io.IpInterface
bindTcp, bindTcp, bindTcp, bindTls, bindTls, bindTls, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls
-
-
-
-
Field Detail
-
context
protected final ServiceContext context
-
-
Constructor Detail
-
AbstractService
public AbstractService(ServiceContext context)
-
AbstractService
public AbstractService()
-
-
Method Detail
-
serviceContext
public ServiceContext serviceContext()
- Specified by:
serviceContext
in interfaceService
-
schedule
public Schedule schedule()
-
stage
public Stage stage()
-
ipSettings
public IpSettings ipSettings()
- Specified by:
ipSettings
in interfaceIpInterface
-
bindTcp
public IpServiceRef bindTcp(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTcp
in interfaceIpInterface
-
bindTls
public IpServiceRef bindTls(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTls
in interfaceIpInterface
-
connectTcp
public IpSocketRef connectTcp(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTcp
in interfaceIpInterface
-
connectTls
public IpSocketRef connectTls(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTls
in interfaceIpInterface
-
trace
public void trace(Object message)
Description copied from interface:Log
Logs a trace-level message.
-
debug
public void debug(Object message)
Description copied from interface:Log
Logs a debug-level message.
-
info
public void info(Object message)
Description copied from interface:Log
Logs an info-level message.
-
warn
public void warn(Object message)
Description copied from interface:Log
Logs a warn-level message.
-
error
public void error(Object message)
Description copied from interface:Log
Logs an error-level message.
-
fail
public void fail(Object message)
Description copied from interface:Log
Logs an fail-level message.
-
close
public void close()
-
-