Package groovyx.gpars.actor.impl

Examples of groovyx.gpars.actor.impl.MessageStream$RemoteMessageStream


    public DataflowWriteChannel<T> leftShift(final DataflowReadChannel<T> ref) {
        return bindDFV(ref);
    }

    private DataflowWriteChannel<T> bindDFV(final DataflowReadChannel<T> ref) {
        ref.getValAsync(new MessageStream() {
            private static final long serialVersionUID = -458384302762038543L;

            @SuppressWarnings({"unchecked"})
            @Override
            public MessageStream send(final Object message) {
View Full Code Here


    private static final long serialVersionUID = -3166182949181062129L;
    private final RemoteHost remoteHost;

    public RemoteDataflowExpression() {
        remoteHost = (RemoteHost) SerialContext.get();
        getValAsync(new MessageStream() {
            private static final long serialVersionUID = -8868544599311892034L;

            @SuppressWarnings({"unchecked"})
            @Override
            public MessageStream send(final Object message) {
View Full Code Here

    @SuppressWarnings("unchecked")
    public final DataflowWriteChannel<T> leftShift(final DataflowReadChannel<T> ref) {
        final DataflowVariable<T> originalRef = retrieveForBind();
        hookWheneverBoundListeners(originalRef);

        ref.getValAsync(new MessageStream() {
            private static final long serialVersionUID = -4966523895011173569L;

            @Override
            public MessageStream send(final Object message) {
                originalRef.bind((T) message);
View Full Code Here

    private static final long serialVersionUID = -420013188758006693L;
    private final RemoteHost remoteHost;

    public RemoteDataflowVariable(final RemoteHost host) {
        remoteHost = host;
        getValAsync(new MessageStream() {
            private static final long serialVersionUID = 7968302123667353660L;

            @SuppressWarnings({"unchecked"})
            @Override
            public MessageStream send(final Object message) {
View Full Code Here

     * @return promise of {@link groovyx.gpars.dataflow.DataflowReadChannel}
     */
    public Promise<DataflowReadChannel> getReadChannel(String host, int port, String name) {
        DataflowVariable<RemoteDataflowBroadcast> broadcastPromise = getPromise(remoteBroadcasts, name, host, port, new RemoteDataflowBroadcastRequestMsg(this.getId(), name));
        final DataflowVariable<DataflowReadChannel> promise = new DataflowVariable<>();
        broadcastPromise.whenBound(new MessageStream() {
            @Override
            public MessageStream send(Object message) {
                promise.bind(((RemoteDataflowBroadcast) message).createReadChannel());
                return this;
            }
View Full Code Here

    }

    @Override
    public final DataflowWriteChannel<T> leftShift(final DataflowReadChannel<T> ref) {
        updateHead().leftShift(ref);
        ref.getValAsync(new MessageStream() {
            @Override
            public MessageStream send(Object message) {
                if (!(message instanceof Throwable))
                    notifyRemote((T)message);
                return this;
View Full Code Here

     *
     * @param ref The DataflowVariable to check for value
     * @return The rest of the stream
     */
    public final StreamCore<T> leftShift(final DataflowReadChannel<T> ref) {
        ref.getValAsync(new MessageStream() {
            @Override
            public MessageStream send(final Object message) {
                first.bind((T) message);
                return null;
            }
View Full Code Here

        throw new UnsupportedOperationException();
    }

    @Override
    public DataflowWriteChannel<T> leftShift(DataflowReadChannel<T> ref) {
        ref.getValAsync(new MessageStream() {
            @Override
            public MessageStream send(Object message) {
                enqueueValue((T) message);
                return this;
            }
View Full Code Here

TOP

Related Classes of groovyx.gpars.actor.impl.MessageStream$RemoteMessageStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.