All Packages Class Hierarchy This Package Previous Next Index
Class AcmeNet.Assn2.EchoService
AcmeNet.Assn2.Service
|
+----AcmeNet.Assn2.EchoService
- public class EchoService
- extends Service
A Service that echoes back the bytes sent to it.
This class may be useful for testing your solution for Assignment 2.
- See Also:
- Service
-
DefaultServiceNum
- The default service number for the EchoService.
-
EchoService(ClientServerNI)
- Creat an EchoServer at a default service number
-
EchoService(ClientServerNI, int)
- Create an EchoService at a given service number.
-
getAddress()
- Get the address of this service.
-
main(String[])
- A program that starts an EchoService.
-
serviceConnection(Connection)
- Handle a connection from a client of this service.
DefaultServiceNum
public static final int DefaultServiceNum
- The default service number for the EchoService.
EchoService
public EchoService(ClientServerNI ni,
int serviceNum) throws AlreadyBoundException
- Create an EchoService at a given service number.
- Parameters:
- ni - the network interface this service should use
- serviceNum - the service number to bind this service to
- Throws: AlreadyBoundException
- there was already a service bound to the requested service number
EchoService
public EchoService(ClientServerNI ni) throws AlreadyBoundException
- Creat an EchoServer at a default service number
- Parameters:
- ni - the network interface this service should use
- Throws: AlreadyBoundException
- there was already a service bound to the default service number
main
public static void main(String argv[]) throws AlreadyBoundException
- A program that starts an EchoService.
getAddress
public ServiceAddress getAddress()
- Get the address of this service.
- Returns:
- the address of this service
serviceConnection
public void serviceConnection(Connection conn)
- Handle a connection from a client of this service.
- Overrides:
- serviceConnection in class Service
All Packages Class Hierarchy This Package Previous Next Index