public abstract class AbstractRequestBlock extends Object implements PollRequest, MemoryRequestBlock
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractRequestBlock.Statistics |
Constructor and Description |
---|
AbstractRequestBlock(org.osgi.framework.BundleContext context,
Executor executor,
String mainTypeName,
String variablePrefix,
String blockPrefix,
boolean enableStatistics,
long period,
int requestSize,
long timeoutQuietPeriod,
boolean eager) |
Modifier and Type | Method and Description |
---|---|
protected long |
calculatePriority(long now) |
void |
dispose() |
void |
handleData(org.apache.mina.core.buffer.IoBuffer data) |
void |
handleDisconnect()
Handle a device disconnect
|
void |
handleError(int error) |
void |
handleFailure(Throwable e) |
void |
handleTimeout() |
protected void |
initialize() |
protected void |
recordChecksumError() |
protected void |
recordUpdate(boolean error) |
protected void |
requestUpdate()
Request an update as soon as possible
|
void |
setVariables(Variable[] variables)
Set the new variable configuration
|
Long |
updatePriority(long now)
The the update priority used to find the next block to request
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createPollRequest, getPollRequestTimeout, handleMessage
getStartAddress, writeBit, writeData
protected void initialize()
public Long updatePriority(long now)
updatePriority
in interface PollRequest
now
- null
if the block does not
want to be
updated right nowprotected long calculatePriority(long now)
public void handleDisconnect()
handleDisconnect
in interface PollRequest
public void handleTimeout()
handleTimeout
in interface PollRequest
public void handleFailure(Throwable e)
handleFailure
in interface PollRequest
public void dispose()
dispose
in interface PollRequest
public void setVariables(Variable[] variables)
variables
- the new variables to setprotected void recordChecksumError()
protected void recordUpdate(boolean error)
public void handleError(int error)
public void handleData(org.apache.mina.core.buffer.IoBuffer data)
protected void requestUpdate()
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.