Examples of FileConnection


Examples of nexj.core.rpc.file.FileConnection

      if (s_logger.isDebugEnabled())
      {
         s_logger.debug("Creating new connection");
      }

      FileConnection connection = ((FileStorageConnectionFactory)fragment.getConnectionFactory()
         .getInstance(m_context)).getConnection(this);

      if (!connection.attachToFile(sDataFile))
      {
         throw new PersistenceException("err.persistence.file.io");
      }

      return connection;
View Full Code Here

Examples of org.teiid.translator.FileConnection

@SuppressWarnings("nls")
public class TestFileExecutionFactory {

  @Test public void testGetTextFiles() throws Exception {
    FileExecutionFactory fef = new FileExecutionFactory();
    FileConnection fc = Mockito.mock(FileConnection.class);
    Mockito.stub(fc.getFile("*.txt")).toReturn(new File(UnitTestUtil.getTestDataPath(), "*.txt"));
    Call call = fef.getLanguageFactory().createCall("getTextFiles", Arrays.asList(new Argument(Direction.IN, new Literal("*.txt", TypeFacility.RUNTIME_TYPES.STRING), TypeFacility.RUNTIME_TYPES.STRING, null)), null);
    ProcedureExecution pe = fef.createProcedureExecution(call, null, null, fc);
    pe.execute();
    int count = 0;
    while (true) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.