001    /*
002     * Copyright (c) 2007-2015 Concurrent, Inc. All Rights Reserved.
003     *
004     * Project and contact information: http://www.cascading.org/
005     *
006     * This file is part of the Cascading project.
007     *
008     * Licensed under the Apache License, Version 2.0 (the "License");
009     * you may not use this file except in compliance with the License.
010     * You may obtain a copy of the License at
011     *
012     *     http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing, software
015     * distributed under the License is distributed on an "AS IS" BASIS,
016     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017     * See the License for the specific language governing permissions and
018     * limitations under the License.
019     */
020    
021    package cascading.scheme;
022    
023    import cascading.tuple.TupleEntry;
024    
025    /**
026     * The concrete base class for {@link SourceCall} and {@link SinkCall}.
027     *
028     * @param <Context>
029     * @param <IO>
030     */
031    public class ConcreteCall<Context, IO> implements SourceCall<Context, IO>, SinkCall<Context, IO>
032      {
033      Context context;
034      TupleEntry entry;
035      IO io;
036    
037      @Override
038      public Context getContext()
039        {
040        return context;
041        }
042    
043      @Override
044      public void setContext( Context context )
045        {
046        this.context = context;
047        }
048    
049      @Override
050      public TupleEntry getOutgoingEntry()
051        {
052        return entry;
053        }
054    
055      public void setOutgoingEntry( TupleEntry outgoingEntry )
056        {
057        this.entry = outgoingEntry;
058        }
059    
060      @Override
061      public TupleEntry getIncomingEntry()
062        {
063        return entry;
064        }
065    
066      public void setIncomingEntry( TupleEntry incomingEntry )
067        {
068        this.entry = incomingEntry;
069        }
070    
071      @Override
072      public IO getInput()
073        {
074        return io;
075        }
076    
077      public void setInput( IO input )
078        {
079        this.io = input;
080        }
081    
082      @Override
083      public IO getOutput()
084        {
085        return io;
086        }
087    
088      public void setOutput( IO output )
089        {
090        this.io = output;
091        }
092      }