1 22 package org.objectweb.petals.binding.filetransferbc; 23 24 import org.objectweb.petals.binding.filetransferbc.listeners.FileTransferBCExternalListenerManager; 25 import org.objectweb.petals.binding.filetransferbc.listeners.FileTransferBCJBIListener; 26 import org.objectweb.petals.component.common.bc.AbstractBindingComponent; 27 import org.objectweb.petals.component.common.bc.ExternalListenerManager; 28 29 37 public class FileTransferBC extends AbstractBindingComponent { 38 39 @Override 40 protected void init(BindingComponentInitializer initializer) { 41 FileTransferBCJBIListener jbiListener = new FileTransferBCJBIListener( 42 getDefaultPath(), getLogger()); 43 ExternalListenerManager externalListenerManager = new FileTransferBCExternalListenerManager( 44 getLogger(), this); 45 46 initializer.setExternalListenerManager(externalListenerManager); 47 initializer.setJbiListener(jbiListener); 48 } 49 50 55 protected String getDefaultPath() { 56 String baseDir = getContext().getInstallRoot(); 57 StringBuffer sb = new StringBuffer (baseDir.substring(0, baseDir 58 .length() 59 - "install".length())); 60 sb.append("FTPBC"); 61 return sb.toString(); 62 } 63 64 } 65 | Popular Tags |