Class UnCxSendReq
- java.lang.Object
-
- com.automation_pros.odva.cip.requests.CipRequest
-
- com.automation_pros.odva.cip.requests.CxMgrReq
-
- com.automation_pros.odva.cip.requests.UnCxSendReq
-
- All Implemented Interfaces:
CipReplyConsumer
,CipMessage
,java.io.Externalizable
,java.io.Serializable
public class UnCxSendReq extends CxMgrReq
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.automation_pros.odva.cip.requests.CipRequest
CipRequest.CallbackException, CipRequest.ChainedException, CipRequest.ReplyFuture
-
-
Field Summary
Fields Modifier and Type Field Description CipRequest
innerreq
CipPath
route
-
Fields inherited from class com.automation_pros.odva.cip.requests.CipRequest
acceptTrace, acceptTS, callbacks, creationTrace, deadline, forecastReply, maxreply, path, scheduler, sentTS, sLogger, svccode
-
-
Constructor Summary
Constructors Constructor Description UnCxSendReq()
UnCxSendReq(CipPath target, int service)
UnCxSendReq(CipPath target, int service, java.nio.ByteBuffer payload)
UnCxSendReq(CipRequest inner, CipPath route)
UnCxSendReq(UnCxSendReq other, int nesting)
UnCxSendReq(java.nio.ByteBuffer source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(CipReply reply)
The Unconnected Send Request must first delegate any reply to the wrapped request before any additional callbacks are handled.CxMgrReq
clone()
int
payloadLength()
Subclasses must override this unless they populate the payload and payloadActual fields.void
putPayload(java.nio.ByteBuffer dest)
Implementations must call this method at the beginning of their putPayload() method.void
setPayload(java.nio.ByteBuffer source)
Implementations must call this method at the beginning of their setPayload() method.java.lang.String
toString()
-
Methods inherited from class com.automation_pros.odva.cip.requests.CxMgrReq
getTimeoutMillis, setTimeoutMillis
-
Methods inherited from class com.automation_pros.odva.cip.requests.CipRequest
accept, accept, addCallback, addCallback, addFutureCallback, bytes, decode, forecast, getPayload, getServiceCode, getSyncReply, getSyncReply, getTarget, payloadBytes, payloadString, put, putSyncReplyPayload, putSyncReplyPayload, readExternal, replyLength, rewrapRequest, service, service, serviceName, set, takeCallbacks, toBytes, writeExternal
-
-
-
-
Field Detail
-
innerreq
public CipRequest innerreq
-
route
public CipPath route
-
-
Constructor Detail
-
UnCxSendReq
public UnCxSendReq()
-
UnCxSendReq
public UnCxSendReq(UnCxSendReq other, int nesting)
-
UnCxSendReq
public UnCxSendReq(CipPath target, int service)
-
UnCxSendReq
public UnCxSendReq(CipPath target, int service, java.nio.ByteBuffer payload)
-
UnCxSendReq
public UnCxSendReq(CipRequest inner, CipPath route)
-
UnCxSendReq
public UnCxSendReq(java.nio.ByteBuffer source)
-
-
Method Detail
-
setPayload
public void setPayload(java.nio.ByteBuffer source)
Description copied from class:CxMgrReq
Implementations must call this method at the beginning of their setPayload() method.- Specified by:
setPayload
in interfaceCipMessage
- Overrides:
setPayload
in classCxMgrReq
- Parameters:
source
- Source buffer containing the encoded new payload.
-
putPayload
public void putPayload(java.nio.ByteBuffer dest)
Description copied from class:CxMgrReq
Implementations must call this method at the beginning of their putPayload() method.- Specified by:
putPayload
in interfaceCipMessage
- Overrides:
putPayload
in classCxMgrReq
- Parameters:
dest
- Destination buffer for the encoded payload.
-
payloadLength
public int payloadLength()
Description copied from class:CipRequest
Subclasses must override this unless they populate the payload and payloadActual fields.- Specified by:
payloadLength
in interfaceCipMessage
- Overrides:
payloadLength
in classCipRequest
- Returns:
- The byte length of the encoded payload only.
-
accept
public void accept(CipReply reply)
The Unconnected Send Request must first delegate any reply to the wrapped request before any additional callbacks are handled. This ensures the inner request is attached as the "real" request for the reply. Note that when an unconnected send is unwrapped in the final Connection Manager and the inner request executed locally, the Connection Manager will have the inner request "take" the wrapper's callbacks, if any.- Specified by:
accept
in interfaceCipReplyConsumer
- Overrides:
accept
in classCipRequest
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCipRequest
-
-