org.opcfoundation.ua.transport
Class AsyncWrite

java.lang.Object
  extended by org.opcfoundation.ua.utils.AbstractState<WriteState,ServiceResultException>
      extended by org.opcfoundation.ua.transport.AsyncWrite
All Implemented Interfaces:
IStatefulObject<WriteState,ServiceResultException>

public class AsyncWrite
extends AbstractState<WriteState,ServiceResultException>

Asynchronous message sending


Constructor Summary
AsyncWrite(IEncodeable messageToWrite)
          Constructor for AsyncWrite.
 
Method Summary
 void attemptSetError(ServiceResultException e)
          attemptSetError.
 boolean cancel()
          cancel.
 IEncodeable getMessage()
          getMessage.
 boolean isCanceled()
          isCanceled.
 void setError(ServiceResultException e)
          setError.
 void setQueued()
          setQueued.
 void setWriting()
          setWriting.
 void setWritten()
          setWritten.
 
Methods inherited from class org.opcfoundation.ua.utils.AbstractState
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, setState, setState, waitForState, waitForState, waitForStateUninterruptibly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncWrite

public AsyncWrite(IEncodeable messageToWrite)

Constructor for AsyncWrite.

Parameters:
messageToWrite - a IEncodeable object.
Method Detail

getMessage

public IEncodeable getMessage()

getMessage.

Returns:
a IEncodeable object.

attemptSetError

public void attemptSetError(ServiceResultException e)

attemptSetError.

Parameters:
e - a ServiceResultException object.

setError

public void setError(ServiceResultException e)

setError.

Overrides:
setError in class AbstractState<WriteState,ServiceResultException>
Parameters:
e - a ServiceResultException object.

cancel

public boolean cancel()

cancel.

Returns:
a boolean.

setQueued

public void setQueued()

setQueued.


setWriting

public void setWriting()

setWriting.


setWritten

public void setWritten()

setWritten.


isCanceled

public boolean isCanceled()

isCanceled.

Returns:
a boolean.


Copyright © 2018. All rights reserved.