public class PortPool extends java.lang.Object implements PortPoolInterface
cvsRev
Modifier and Type | Method and Description |
---|---|
void |
checkin(PortInterface port)
Return the port to the port pool.
|
PortInterface |
checkout()
Get a port from the port pool to communicate with the PLC.
|
void |
clear()
This method is called when the port pool is no longer in use.
|
int |
getMaxPorts()
Returns the maximum number of ports that we will open to communicate with
the device.
|
java.lang.String |
getName()
Returns the name of this port.
|
boolean |
isRunning()
Returns the running status of this port pool.
|
void |
setMaxPorts(int maxPorts)
Sets the maximum number of ports that we will open to communicate with
the device.
|
public void checkin(PortInterface port) throws BadParameterException
checkin
in interface PortPoolInterface
BadParameterException
- thrown if the port is not checked out.PortPoolInterface.checkout()
public PortInterface checkout() throws java.io.IOException, BadParameterException
checkout
in interface PortPoolInterface
java.io.IOException
BadParameterException
public void clear()
clear
in interface PortPoolInterface
public int getMaxPorts()
public java.lang.String getName()
getName
in interface PortPoolInterface
public boolean isRunning()
public void setMaxPorts(int maxPorts)
setMaxPorts
in interface PortPoolInterface
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.