Package io.s4.message

Examples of io.s4.message.Request


        String inputFilename = (String) loArgs.get(0);

        EventEmitter emitter = null;

        SerializerDeserializer serDeser = new KryoSerDeser();

        CommLayerEmitter clEmitter = new CommLayerEmitter();
        clEmitter.setAppName(senderApplicationName);
        clEmitter.setListenerAppName(listenerApplicationName);
        clEmitter.setClusterManagerAddress(clusterManagerAddress);
View Full Code Here


     * @throws IOException
     *             if the underlying socket could not provide valid input and
     *             output streams.
     */
    public IOChannel createIOChannel(Socket socket) throws IOException {
        return new ByteArrayIOChannel(socket);
    }
View Full Code Here

        byte[] v;

        try {
            ClientConnection conn = null;

            ByteArrayIOChannel io = new ByteArrayIOChannel(s);

            v = io.recv();

            if (v == null || v.length == 0) {
                // no information => client initialization
                clientInit(io);
View Full Code Here

    private Map<String, Cloner> clonerMap = new HashMap<String, Cloner>();

    public void processEvent(Object event) {
        Object newEvent = event;
        if (transformers != null && transformers.length > 0) {
            Cloner cloner = clonerMap.get(event.getClass().getName());
            if (cloner == null) {
                ClonerGenerator cg = new ClonerGenerator();
                // generate byte code that knows how to call the clone method on
                // this event
                Class clonerClass = cg.generate(event.getClass());
                try {
                    cloner = (Cloner) clonerClass.newInstance();
                    clonerMap.put(event.getClass().getName(), cloner);
                } catch (InstantiationException ie) {
                    Logger.getLogger(this.getClass()).error(ie);
                    throw new RuntimeException(ie);
                } catch (IllegalAccessException ias) {
                    Logger.getLogger(this.getClass()).error(ias);
                    throw new RuntimeException(ias);
                }
            }
            newEvent = cloner.clone(event);
        }

        for (Transformer transformer : transformers) {
            newEvent = transformer.transform(newEvent);
            if (newEvent == null) {
View Full Code Here

    public void processEvent(Object event) {
        Object newEvent = event;
        if (transformers != null && transformers.length > 0) {
            Cloner cloner = clonerMap.get(event.getClass().getName());
            if (cloner == null) {
                ClonerGenerator cg = new ClonerGenerator();
                // generate byte code that knows how to call the clone method on
                // this event
                Class clonerClass = cg.generate(event.getClass());
                try {
                    cloner = (Cloner) clonerClass.newInstance();
                    clonerMap.put(event.getClass().getName(), cloner);
                } catch (InstantiationException ie) {
                    Logger.getLogger(this.getClass()).error(ie);
View Full Code Here

    public AbstractWindowingPE() {
    }

    public void init() {
        // this reference will be shared amongst all instances of the pe
        slotUtils = new SlotUtils(slotSize);

        try {
            slotClass = Class.forName(slotClassName);
        } catch (ClassNotFoundException cnfe) {
            throw new RuntimeException(cnfe);
View Full Code Here

            System.out.println("Intializing event clock time with seed time " + s4EventClock.getCurrentTime());
        }
       
        PEContainer peContainer = (PEContainer) context.getBean("peContainer");

        Watcher w = (Watcher) context.getBean("watcher");
        w.setConfigFilename(configPath);

       
        // load extension modules
        String[] configFileNames = getModuleConfigFiles(extsHome, prop);
        if (configFileNames.length > 0) {
View Full Code Here

        }

        coreContext = new FileSystemXmlApplicationContext(coreConfigFileUrls, coreContext);
        ApplicationContext context = coreContext;       
       
        Clock s4Clock = (Clock) context.getBean("clock");
        if (s4Clock instanceof EventClock && seedTime > 0) {
            EventClock s4EventClock = (EventClock)s4Clock;
            s4EventClock.updateTime(seedTime);
            System.out.println("Intializing event clock time with seed time " + s4EventClock.getCurrentTime());
        }
View Full Code Here

    static EventClock s4Clock;
    static Persister persister;

    public static void main(String[] args) {
        TestPersisterEventClock testPersisterClock = new TestPersisterEventClock();
        s4Clock = new EventClock();
        s4Clock.updateTime(69990000);
        TimeUpdaterThread timeUpdater = new TimeUpdaterThread(s4Clock);
        Thread timeUpdaterThread = new Thread(timeUpdater);
        timeUpdaterThread.start();
        persister = new HashMapPersister(s4Clock);
View Full Code Here

        coreContext = new FileSystemXmlApplicationContext(coreConfigFileUrls, coreContext);
        ApplicationContext context = coreContext;       
       
        Clock s4Clock = (Clock) context.getBean("clock");
        if (s4Clock instanceof EventClock && seedTime > 0) {
            EventClock s4EventClock = (EventClock)s4Clock;
            s4EventClock.updateTime(seedTime);
            System.out.println("Intializing event clock time with seed time " + s4EventClock.getCurrentTime());
        }
       
        PEContainer peContainer = (PEContainer) context.getBean("peContainer");

        Watcher w = (Watcher) context.getBean("watcher");
View Full Code Here

TOP

Related Classes of io.s4.message.Request

Copyright © 2018 www.massapicom. 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.