Examples of CoreRemoteStreamReference


Examples of org.ryant.tubesock.core.stream.CoreRemoteStreamReference

    @Test
    public void testConnectionRejectedOnBadHash() throws Exception
    {
        ByteArrayInputStream input = new ByteArrayInputStream(TEST_STRING.getBytes());
        RemoteStreamReference details = manager.createRemoteStream(input);
        RemoteStreamReference badDetails = new CoreRemoteStreamReference(details.getHost(), details.getPort(), details.getHash().replaceAll("-", "+"), details.getExpiry());

        try
        {
            InputStream is = RemoteStreamClientFactory.getRemoteStreamClient(badDetails).getInputStream();
        }
View Full Code Here

Examples of org.ryant.tubesock.core.stream.CoreRemoteStreamReference

            log.error("An InputStream was replaced for hash {}", hash);
        }

        evictionTimer.schedule(new EvictionTask(hash), timeUnit.convert(timeToLive, TimeUnit.MILLISECONDS));

        return new CoreRemoteStreamReference(host, port, hash,
                 System.currentTimeMillis() + timeUnit.convert(timeToLive, TimeUnit.MILLISECONDS));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.