autohit.server.service
Class SocketRelayService
java.lang.Object
autohit.vm.VM
autohit.server.service.Service
autohit.server.service.SocketRelayService
- public class SocketRelayService
- extends Service
This is a socket relay service. It's a dumb relay for sockets. Don't ask why
I did this. It will accept connections on port
AutohitProperties.value_SOCKETRELAY_SERVER_PORT. It'll relay them to the
current property settings for
AutohitProperties.SERVICE_SOCKETRELAY_DESTINATION_ADDR and
AutohitProperties.SERVICE_SOCKETRELAY_DESTINATION_PORT for address and port,
respectively. If either is not set, a default will be used, though there is
little utility in the default.
The relay will stay active until either side drops the connection. There is
absolutely no filtering or logging.
- Version:
- 1.0 Version History
EPG - Initial - 12SEP03
- Author:
- Erich P. Gatejen
Fields inherited from class autohit.server.service.Service |
sc |
Fields inherited from class autohit.vm.VM |
buf, core, errors, faults, ip, left, loader, myLog, process, right, rinjector, rootProgram, sname, state, STATE_ACTIVE_THRESHOLD, STATE_BUILDING, STATE_DONE, STATE_INVALID, STATE_NEW, STATE_NO_VM, STATE_PAUSED, STATE_RUNNING, TIME_GRAN |
Methods inherited from class autohit.vm.VM |
attach, die, finalize, getState, init, pause, prepare, resume, setParentCore, start, ticks |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketRelayService
public SocketRelayService()
- Default constructor
construct
public void construct()
throws ServiceException
- Complete construction. This will be called when the VM is initialized.
- Specified by:
construct
in class VM
- Throws:
ServiceException
execute
public void execute()
throws ServiceException
- Fast loop. We spend most of our time waiting for connections. Cycle back
to VM only after an accept or a timeout.
- Specified by:
execute
in class VM
- Throws:
ServiceException
- See Also:
VMException
destruct
public void destruct()
throws ServiceException
- Complete destroy. This will be called when the VM is finalizing.
- Specified by:
destruct
in class VM
- Throws:
ServiceException
Test.