package javabridge;

/**
 * Created by yingdac on 3/31/14.
 */
public class ActiveContextBridge {
}

@@ -1,100 +1,2296 @@
-package javabridge;%0A%0A/**%0A * Created by yingdac on 3/31/14.%0A */%0Apublic class ActiveContextBridge %7B
+/**%0A * Copyright (C) 2013 Microsoft Corporation%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage javabridge;%0A%0Aimport com.microsoft.reef.driver.context.ActiveContext;%0Aimport com.microsoft.tang.ClassHierarchy;%0Aimport com.microsoft.tang.Configuration;%0Aimport com.microsoft.tang.formats.AvroConfigurationSerializer;%0A%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0Apublic class ActiveContextBridge implements AutoCloseable %7B%0A    private static final Logger LOG = Logger.getLogger(AllocatedEvaluatorBridge.class.getName());%0A%0A    private ActiveContext jactiveContext;%0A%0A    private AvroConfigurationSerializer serializer;%0A%0A%0A    public static final String CLASS_HIERARCHY_FILENAME = %22clrClassHierarchy.bin%22;%0A%0A    public ActiveContextBridge(ActiveContext activeContext)%0A    %7B%0A        jactiveContext = activeContext;%0A        serializer = new AvroConfigurationSerializer();%0A    %7D%0A%0A    public void submitTaskString( final String taskConfigurationString)%0A    %7B%0A%0A        if(taskConfigurationString.isEmpty())%0A        %7B%0A            throw new RuntimeException(%22empty taskConfigurationString provided.%22);%0A        %7D%0A        ClassHierarchy clrClassHierarchy = Utilities.loadClassHierarchy(CLASS_HIERARCHY_FILENAME);%0A        Configuration taskConfiguration;%0A        try %7B%0A            taskConfiguration = serializer.fromString(taskConfigurationString, clrClassHierarchy);%0A        %7D catch (final Exception e) %7B%0A            final String message = %22Unable to de-serialize CLR  task configurations using class hierarchy.%22;%0A            LOG.log(Level.SEVERE, message, e);%0A            throw new RuntimeException(message, e);%0A        %7D%0A        jactiveContext.submitTask(taskConfiguration);%0A    %7D%0A%0A    @Override%0A    public void close()%0A    %7B%0A        jactiveContext.close();%0A    %7D
 %0A%7D%0A

add back activecontextbridge