public class RadiusOITransport extends OITransport
dataProvider, filedataProvider, node, pollingInterval
Constructor and Description |
---|
RadiusOITransport(OINode oinode,
Factory factory,
int port,
int interval,
int expire)
Construct a RadiusOITransport to be used within the specified OINode.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
Disconnect and close the socket.
|
protected void |
connect()
Create the socket and attempt to establish a connection.
|
void |
dataIsAvailable()
This method allows the transport's DataProvider to tell the transport
that data is waiting to be 'picked up'.
|
Factory |
getFactory()
Retrieve the Factory object used to create the DatagramPackets
|
java.net.DatagramSocket |
getSocket()
Retrieve the DatagramSocket object used to send/receive DatagramPackets
|
boolean |
isConnected()
Indicates whether this RadiusOITransport is connected to the socket
|
boolean |
isDataAvailable()
Indicates whether data is available from the transport's DataProvider
|
boolean |
isHealthy()
This method is used to check if the transport is fully functional
|
boolean |
isProcessingData()
Indicates whether this RadiusOITransport is currently processing data
|
boolean |
isRunning()
Indicates whether this RadiusOITransport is running
|
void |
processData(DCFieldContainer record)
Accept an
OIRecord object to be transmitted via UDP. |
void |
processData(DCFieldContainer[] records)
Not used
|
protected void |
reconnect()
Attempt to re-establish the connection.
|
void |
run()
This method is used when the OITransport runs within its own thread.
|
void |
setFactory(Factory factory)
Set the Factory object used to create the DatagramPackets
|
protected void |
setProcessingData(boolean value)
Sets the boolean indicating whether the transport is currently
processing data.
|
protected void |
setRunning(boolean run)
Sets the boolean which indicates whether the transport is running
|
void |
shutdown()
Stop the transport.
|
fileDataIsAvailable, getDataProvider, getFileDataProvider, getNode, getPollingInterval, getRealNarsOut, incrementOut, processEndOfFileData, processFileData, processFileData, processRejectFile, processStartOfFileData, setDataProvider, setFileDataProvider, setNode, setPollingInterval, setTransactionID
public RadiusOITransport(OINode oinode, Factory factory, int port, int interval, int expire) throws NodeStartException
oinode
- Reference to the OINode containing the transportfactory
- The Factory object used to create DatagramPackets
from the incoming OIRecords.port
- The port number on which to create the socketinterval
- The number of seconds between transmit attemptsexpire
- The number of seconds after which the request has
expired and attempts to transmit should ceaseNodeStartException
public void dataIsAvailable()
getData()
method and process it via the receiver's
processData()
method.dataIsAvailable
in interface DataReceiverIfc
dataIsAvailable
in class OITransport
public void processData(DCFieldContainer record) throws NodeProcessingException
OIRecord
object to be transmitted via UDP.processData
in interface DataReceiverIfc
processData
in class OITransport
records
- An OIRecord
object.NodeProcessingException
public void processData(DCFieldContainer[] records) throws NodeProcessingException
NodeProcessingException
public void run()
run
in interface java.lang.Runnable
run
in class OITransport
public void shutdown()
shutdown
in interface DCTransport
shutdown
in class OITransport
public boolean isHealthy()
isHealthy
in interface DCTransport
isHealthy
in class OITransport
public void setFactory(Factory factory)
factory
- The Factory used to create the DatagramPacketspublic Factory getFactory()
public java.net.DatagramSocket getSocket()
protected void setRunning(boolean run)
public boolean isRunning()
public boolean isDataAvailable()
public boolean isProcessingData()
protected void setProcessingData(boolean value)
public boolean isConnected()
protected void connect() throws java.io.IOException
java.io.IOException
protected void close()
protected void reconnect()