public class AppSocketMux extends java.lang.Object implements NetIF
Modifier and Type | Method and Description |
---|---|
void |
close()
Close a NetIF
|
boolean |
connect()
Connect to my local Router.
|
boolean |
enqueueDatagram(Datagram dg)
Puts a datagram on the incoming queue for this network interface
|
Address |
getAddress()
Get the Address for this connection.
|
FabricDevice |
getFabricDevice()
The fabric device which moves packets to/from this interface
|
int |
getID()
Get the ID of this NetIF.
|
java.lang.String |
getName()
Get the name of this NetIF.
|
NetIFListener |
getNetIFListener()
Get the Listener of a NetIF.
|
Address |
getRemoteRouterAddress()
Get the Address of the remote router this NetIF is connected to
|
java.lang.String |
getRemoteRouterName()
Get the name of the remote router this NetIF is connected to.
|
RouterPort |
getRouterPort()
Get the RouterPort a NetIF is plugIged into.
|
java.util.Map<java.lang.Integer,NetStats> |
getSocketStats()
Get the socket stats.
|
NetStats |
getStats()
Get the interface stats.
|
int |
getWeight()
Get the weight of this NetIF.
|
boolean |
isClosed()
Is closed.
|
boolean |
isLocal()
Is this a local interface
|
boolean |
outQueueHandler(Datagram datagram,
DatagramDevice device)
Deliver a received datagram to the appropriate app
|
void |
remoteClose()
Remote close received
|
boolean |
sendDatagram(Datagram dg)
Send a Datagram -- sets source to this interface and puts the datagram
on the incoming queue for this interface
|
void |
setAddress(Address addr)
Set the Address for this connection.
|
void |
setID(int id)
Set the ID of this NetIF.
|
void |
setName(java.lang.String name)
Set the name of this NetIF.
|
void |
setNetIFListener(NetIFListener l)
Set the Listener of NetIF.
|
void |
setRemoteRouterAddress(Address addr)
Set the Address of the remote router this NetIF is connected to.
|
void |
setRemoteRouterName(java.lang.String name)
Set the name of the remote router this NetIF is connected to.
|
void |
setRouterPort(RouterPort rp)
Set the RouterPort a NetIF is plugIged into.
|
void |
setWeight(int w)
Set the weight of this NetIF.
|
boolean |
start()
Start me up.
|
boolean |
stop()
Close all sockets.
|
public boolean start()
public boolean stop()
public boolean connect() throws java.io.IOException
public FabricDevice getFabricDevice()
getFabricDevice
in interface DatagramDevice
public java.lang.String getName()
getName
in interface DatagramDevice
public void setName(java.lang.String name)
setName
in interface DatagramDevice
public int getWeight()
public void setWeight(int w)
public Address getAddress()
getAddress
in interface DatagramDevice
public void setAddress(Address addr)
setAddress
in interface DatagramDevice
public java.lang.String getRemoteRouterName()
getRemoteRouterName
in interface NetIF
public void setRemoteRouterName(java.lang.String name)
setRemoteRouterName
in interface NetIF
public Address getRemoteRouterAddress()
getRemoteRouterAddress
in interface NetIF
public void setRemoteRouterAddress(Address addr)
setRemoteRouterAddress
in interface NetIF
public NetStats getStats()
public java.util.Map<java.lang.Integer,NetStats> getSocketStats()
public boolean isLocal()
NetIF
public NetIFListener getNetIFListener()
getNetIFListener
in interface DatagramDevice
public void setNetIFListener(NetIFListener l)
setNetIFListener
in interface DatagramDevice
public RouterPort getRouterPort()
getRouterPort
in interface NetIF
public void setRouterPort(RouterPort rp)
setRouterPort
in interface NetIF
public void remoteClose()
remoteClose
in interface NetIF
public boolean sendDatagram(Datagram dg) throws java.net.NoRouteToHostException
sendDatagram
in interface DatagramDevice
java.net.NoRouteToHostException
public boolean enqueueDatagram(Datagram dg) throws java.net.NoRouteToHostException
enqueueDatagram
in interface DatagramDevice
java.net.NoRouteToHostException
public boolean outQueueHandler(Datagram datagram, DatagramDevice device)
outQueueHandler
in interface DatagramDevice
User Space Routing 0.10.3