new InetSocketAddress(port), this.communicationProtocol, connectionManager, serverSocketBackLog); ManagedObjectTaskBuilder<None, None> accepterTask = mosContext.addWork( "accepter", this.serverSocketAccepter).addTask("accepter", this.serverSocketAccepter);
@Override protected void loadMetaData(MetaDataContext<None, Flows> context) throws Exception { ManagedObjectSourceContext<Flows> mosContext = context .getManagedObjectSourceContext(); // Obtain the expire check interval this.expireCheckInterval = Long.parseLong(mosContext.getProperty( PROPERTY_EXPIRE_CHECK_INTERVAL, String.valueOf(DEFAULT_EXPIRE_CHECK_INTERVAL))); // Obtain the event timeout this.eventTimeout = Long.parseLong(mosContext.getProperty( PROPERTY_EVENT_TIMEOUT, String.valueOf(DEFAULT_EVENT_TIMEOUT))); // Obtain the request timeout this.requestTimeout = Long.parseLong(mosContext.getProperty( PROPERTY_REQUEST_TIMEOUT, String.valueOf(DEFAULT_REQUEST_TIMEOUT))); // Specify meta-data context.setObjectClass(CometService.class); context.setManagedObjectClass(CometServiceManagedObject.class); // Provide task to trigger expire ExpireTask factory = new ExpireTask(); mosContext.addWork("EXPIRE", factory).addTask("TASK", factory) .setTeam(EXPIRE_TEAM_NAME); context.addFlow(Flows.EXPIRE, null); mosContext.linkProcess(Flows.EXPIRE, "EXPIRE", "TASK"); }
mosContext.addWork("SetupAutoWireListener", dummy) .addTask("SetupAutoWireListener", dummy) .setTeam(listenerTeamName); ManagedObjectTaskBuilder listenerTask = mosContext.addWork( listenerName, socketListener).addTask(listenerName, socketListener); ManagedObjectTaskBuilder heartBeatTask = mosContext.addWork( heartBeatName, connectionManager).addTask(heartBeatName, connectionManager);
.setLabel("SSL_TASKS").getIndex(); SslTaskWork sslTaskExecution = new SslTaskWork(); ManagedObjectWorkBuilder<SslTaskWork> work = mosContext.addWork( "SSL_TASK_EXECUTOR", sslTaskExecution); ManagedObjectTaskBuilder<SslTaskDependencies, None> task = work