|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.SocketImpl
verinec.netsim.util.net.sockets.fsm.FSMSocketImpl
public abstract class FSMSocketImpl
The Finite State Machine for SocketImplementations. It acts as a wrapper that makes the protected methods visible
| Field Summary | |
|---|---|
protected Logger |
jlogger
this classes logger |
protected SocketImpl |
parent
the socketImpl, which forwards it's work to this state socketImpl |
| Fields inherited from class java.net.SocketImpl |
|---|
address, fd, localport, port |
| Fields inherited from interface java.net.SocketOptions |
|---|
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
| Constructor Summary | |
|---|---|
private |
FSMSocketImpl()
Creates a new Finite State Machine for SocketImplementations |
|
FSMSocketImpl(SocketImpl parent)
Creates a new Finite State Machine for SocketImplementations |
| Method Summary | |
|---|---|
protected void |
create(boolean stream)
|
void |
faccept(SocketImpl s)
|
int |
favailable()
|
void |
fbind(InetAddress host,
int port)
|
void |
fclose()
|
void |
fconnect(InetAddress address,
int port)
|
void |
fconnect(SocketAddress address,
int timeout)
|
void |
fconnect(String host,
int port)
|
void |
fcreate(boolean stream)
|
InputStream |
fgetInputStream()
|
OutputStream |
fgetOutputStream()
|
void |
fsendUrgentData(int data)
|
Object |
getOption(int optID)
|
void |
listen(int backlog)
|
abstract void |
proccessUp(Packet packet)
Proccesses an incoming packet |
void |
setBacklog(int backlog)
Sets the number of accpeting connections |
void |
setOption(int optID,
Object value)
|
| Methods inherited from class java.net.SocketImpl |
|---|
accept, available, bind, close, connect, connect, connect, getFileDescriptor, getInetAddress, getInputStream, getLocalPort, getOutputStream, getPort, sendUrgentData, setPerformancePreferences, shutdownInput, shutdownOutput, supportsUrgentData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SocketImpl parent
protected Logger jlogger
| Constructor Detail |
|---|
public FSMSocketImpl(SocketImpl parent)
parent - The SocketImplprivate FSMSocketImpl()
| Method Detail |
|---|
public abstract void proccessUp(Packet packet)
packet - a packet to be proccessed
public void fclose()
throws IOException
IOException - if an I/O error occurs when closing this socket.SocketImpl.close()
public int favailable()
throws IOException
IOException - if an I/O error occurs when determining the
number of bytes available.SocketImpl.available()
public void listen(int backlog)
throws IOException
listen in class SocketImplbacklog - the maximum length of the queue.
IOException - if an I/O error occurs when creating the queue.SocketImpl.listen(int)
public void fsendUrgentData(int data)
throws IOException
data - The byte of data to send
IOException - if there is an error
sending the data.SocketImpl.sendUrgentData(int)
public void fcreate(boolean stream)
throws IOException
stream - if true, create a stream socket;
otherwise, create a datagram socket.
IOException - if an I/O error occurs while creating the
socket.SocketImpl.create(boolean)
public InputStream fgetInputStream()
throws IOException
IOException - if an I/O error occurs when creating the
input stream.SocketImpl.getInputStream()
public OutputStream fgetOutputStream()
throws IOException
IOException - if an I/O error occurs when creating the
output stream.SocketImpl.getOutputStream()
public void fconnect(String host,
int port)
throws IOException
host - the name of the remote host.port - the port number.
IOException - if an I/O error occurs when connecting to the
remote host.SocketImpl.connect(java.lang.String, int)
public void fbind(InetAddress host,
int port)
throws IOException
host - the IP address of the remote host.port - the port number.
IOException - if an I/O error occurs when binding this socket.SocketImpl.bind(java.net.InetAddress, int)
public void fconnect(InetAddress address,
int port)
throws IOException
address - the IP address of the remote host.port - the port number.
IOException - if an I/O error occurs when attempting a
connection.SocketImpl.connect(java.net.InetAddress, int)
public void fconnect(SocketAddress address,
int timeout)
throws IOException
address - the Socket address of the remote host.timeout - the timeout value, in milliseconds, or zero for no timeout.
IOException - if an I/O error occurs when attempting a
connection.SocketImpl.connect(java.net.SocketAddress, int)
public void faccept(SocketImpl s)
throws IOException
s - the accepted connection.
IOException - if an I/O error occurs when accepting the
connection.SocketImpl.accept(java.net.SocketImpl)
public Object getOption(int optID)
throws SocketException
optID - an int identifying the option to fetch
SocketException - if the socket is closed
SocketException - if optID is unknown along the
protocol stack (including the SocketImpl)SocketOptions.getOption(int)
public void setOption(int optID,
Object value)
throws SocketException
optID - identifies the optionvalue - the parameter of the socket option
SocketException - if the option is unrecognized,
the socket is closed, or some low-level error occurredSocketOptions.setOption(int, java.lang.Object)
protected final void create(boolean stream)
throws IOException
create in class SocketImplIOExceptionSocketImpl.create(boolean)public void setBacklog(int backlog)
backlog - the number of accpeting connections
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||