Package org.jpos.space

Examples of org.jpos.space.Space


        prefix = sb.toString(); // little hack, we'll reuse later with defSuffix
        sb.append (suffix);
        sb.append (".xml");
        String uri = sb.toString ();

        Space sp = SpaceFactory.getSpace();
        Element schema = (Element) sp.rdp (uri);
        if (schema == null) {
            schema = loadSchema(uri, defSuffix == null);
            if (schema == null && defSuffix != null) {
                sb = new StringBuilder (prefix);
                sb.append (defSuffix);
                sb.append (".xml");
                schema = loadSchema(sb.toString(), true);
            }
            sp.out (uri, schema);
        }
        return schema;
    }
View Full Code Here



    private LocalSpace grabSpace (Element e) throws ConfigurationException
    {
        String uri = e != null ? e.getText() : "";
        Space sp = SpaceFactory.getSpace (uri);
        if (sp instanceof LocalSpace) {
            return (LocalSpace) sp;
        }
        throw new ConfigurationException ("Invalid space " + uri);
    }
View Full Code Here

    @Ignore("Failing and don't really know what this test tries to verify")
    @Test
    public void waitForWorkersOnStopDoesNotDeadlockWithUnfortunatelyTimedDisconnectReceivedByReceiver() throws Exception {
        // Ensure no deadlock between Receiver trying to call disconnect() and stop() joining on Receiver.
        StubISOChannel channel = new StubISOChannel();
        Space space = spy(new TSpace());

        ThreadTrap trap = new ThreadTrap(RECEIVER_THREAD_NAME).delegateAfterCatchCall().delegateAfterReleaseCall();
        trap.catchVictim().when(space).out(eq(RECONNECT_SPACE_KEY), any(), eq(RECONNECT_DELAY));
        trap.release().when(space).out(eq(READY_SPACE_KEY), not(isA(Date.class)));
View Full Code Here

    @Test
    public void waitForWorkersOnStopDoesNotDeadlockWithUnfortunatelyTimedDisconnectReceivedBySender() throws Exception {
        // Ensure no deadlock between Sender trying to call disconnect() and stop() joining on Sender.
        StubISOChannel channel = new StubISOChannelThatThrowsExceptionOnSend();
        LogListener logListener = mock(LogListener.class);
        Space space = spy(new TSpace());

        ThreadTrap trap = new ThreadTrap(SENDER_THREAD_NAME).delegateAfterReleaseCall();
        trap.catchVictim().when(logListener).log(argThat(sendErrorLogEvent()));
        trap.release().when(space).out(eq(IN_SPACE_KEY), not(isA(ISOMsg.class)));
View Full Code Here

TOP

Related Classes of org.jpos.space.Space

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.