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, setTransactionIDpublic 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 ceaseNodeStartExceptionpublic void dataIsAvailable()
getData() method and process it via the receiver's
processData() method.dataIsAvailable in interface DataReceiverIfcdataIsAvailable in class OITransportpublic void processData(DCFieldContainer record) throws NodeProcessingException
OIRecord object to be transmitted via UDP.processData in interface DataReceiverIfcprocessData in class OITransportrecords - An OIRecord object.NodeProcessingExceptionpublic void processData(DCFieldContainer[] records) throws NodeProcessingException
NodeProcessingExceptionpublic void run()
run in interface java.lang.Runnablerun in class OITransportpublic void shutdown()
shutdown in interface DCTransportshutdown in class OITransportpublic boolean isHealthy()
isHealthy in interface DCTransportisHealthy in class OITransportpublic 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.IOExceptionprotected void close()
protected void reconnect()