var component = new Component(); component = null; // delete this at next garbage collection
component = new Component();
for (int i = 0; i < nComponents; i++) { Component component = new Component(); component.Shifts = // Code here component.Couplings = // Code here AllComponents[i] = component; }
for (int i = 0; i < nComponents; i++) { AllComponents[i] = new Component(); AllComponents[i].Shifts = // Code here AllComponents[i].Couplings = // Code here }
for (int i = 0; i < nComponents; i++) { AllComponents[i] = new Component(); }
//setup Component component = new Component(); //act configure(component); //assert /*assert does not throw*/{ component.doSomething(); }
public ControllerStarter(ControllerConf conf) { LOGGER.info("Trying to init ControllerStarter with config: {}", conf); _config = conf; HelixKafkaMirrorMakerMetricsReporter.init(conf); _component = new Component(); _controllerRestApp = new ControllerRestApplication(null); _helixMirrorMakerManager = new HelixMirrorMakerManager(_config); _validationManager = new ValidationManager(_helixMirrorMakerManager); _srcKafkaValidationManager = getSourceKafkaClusterValidationManager(); _autoTopicWhitelistingManager = getAutoTopicWhitelistingManager(); if (_config.getBackUpToGit()) { _clusterInfoBackupManager = new ClusterInfoBackupManager(_helixMirrorMakerManager, new GitBackUpHandler(conf.getRemoteBackupRepo(), conf.getLocalGitRepoPath()), _config); } else { _clusterInfoBackupManager = new ClusterInfoBackupManager(_helixMirrorMakerManager, new FileBackUpHandler(conf.getLocalBackupFilePath()), _config); } }
JScrollPane sp = new JScrollPane(comp); this.add(sp, BorderLayout.CENTER); private void replace() { comp = new Component(...); //name and type of the components is not important sp.setViewportView(comp); }
public <T extends Component> T doStuff(T input){ T t = new T(); // NO! T.someStaticMethod(); // NO! return (T) new Component(); //hacky, but OK }
Component c = new Component(); c.getServers().add(Protocol.HTTP, 8182); VirtualHost host = new VirtualHost(); host.setHostDomain("localhost"); c.getHosts().add(host); host.attach(new Restlet() { @Override public void handle(Request request, Response response) { response.setEntity("hello, world", MediaType.TEXT_PLAIN); } }); c.start();
public ManagerStarter(ManagerConf conf) { LOGGER.info("Trying to init ManagerStarter with config: {}", conf); _config = conf; HelixKafkaMirrorMakerMetricsReporter.init(conf); _component = new Component(); _srcKafkaValidationManager = new SourceKafkaClusterValidationManager(_config); _controllerHelixManager = new ControllerHelixManager(_srcKafkaValidationManager, _config); }
public static void main(String[] args) throws Exception { // Create a new Component. Component component = new Component(); // Add a new HTTP server listening on port 8182. component.getServers().add(Protocol.HTTP, 8182); // Attach the sample application. component.getDefaultHost().attach("/firstSteps", new FirstStepsApplication()); // Start the component. component.start(); }
Component component = new Component(); component.getServers().add(Protocol.HTTP, 8182); MyApplication app = new MyApplication(); component.getDefaultHost().attachDefault(app); component.getInternalRouter().attachDefault(app);
public static void main(String[] args) throws Exception { // Create a new Component. Component component = new Component(); // Add a new HTTP server listening on port 8111. component.getServers().add(Protocol.HTTP, 8111); component.getDefaultHost().attach("/firstResource", new FirstResourceApplication()); // Start the component. component.start(); }
public static void main(String[] args) throws Exception { Component c = new Component(); c.getServers().add(Protocol.HTTP, 8182); c.getDefaultHost().attach(new QueryRouterApplication()); c.start(); }
public static void main(String[] args) throws Exception { Component c = new Component(); // server listening on pport 8182 c.getServers().add(Protocol.HTTP, 8182); // client connector required by the Directory. c.getClients().add(Protocol.FILE); c.getDefaultHost().attach(new AuthenticationApplication()); c.start(); }
public static void main(String[] args) throws Exception { Component component = new Component(); component.getServers().add(Protocol.HTTP, 8111); component.getClients().add(Protocol.FILE); component.getDefaultHost().attach(new MergeSitesServicesApplication()); component.start(); }
public static void main(String[] args) throws Exception { // Setup Restlet Component component = new Component(); component.getClients().add(Protocol.HTTP); component.getClients().add(Protocol.HTTPS); component.getServers().add(Protocol.HTTP, 8888); component.getDefaultHost().attach("/sample", new SampleApplication()); component.start(); } }
@Override public void startServer() throws Exception { configuration.refresh(); component = new Component(); component.getServers().add( Protocol.HTTP, configuration.get().port().get() ); RestApplication application = module.newObject( RestApplication.class, component.getContext() ); component.getDefaultHost().attach( application ); component.start(); }
public static void main(String... args) throws Exception { // Create a component with an HTTP server connector final Component component = new Component(); component.getServers().add(Protocol.HTTP, 8585); component.getClients().add(Protocol.FILE); component.getClients().add(Protocol.CLAP); component.getClients().add(Protocol.HTTP); // Attach the application to the default host and start it component.getDefaultHost().attach("/foaf", new Application()); component.start(); }