Package org.activeio

Examples of org.activeio.ChannelFactory


            activeConnectionsCounter.reset();
            echoedBytesCounter.reset();
           
            shutdownLatch = new Latch();
               
            ChannelFactory factory = new ChannelFactory();
            AsynchChannelServer server = factory.bindAsynchChannel(url);
            System.out.println("Server accepting connections on: "+server.getConnectURI());
            server.setAcceptListener(this);
            server.start();
           
            while(!shutdownLatch.attempt(sampleInterval)) {
View Full Code Here


     * @throws JMSException
     */
    private AsynchChannel createAsynchChannel(URI remoteLocation) throws JMSException {
        try {
            remoteLocation = URIConverter.convert(remoteLocation);
            AsynchChannel channel = new ChannelFactory().openAsynchChannel(remoteLocation);
            // If the channel is not allready buffered.. lets buffer it.
            //if( channel.narrow(WriteBufferedAsynchChannel.class)==null && channel.narrow(WriteBufferedSynchChannel.class)==null ) {
            //    channel = new WriteBufferedAsynchChannel(channel);
            //}
            return channel;
View Full Code Here

     * @return
     */
    private AsynchChannelServer createAsynchChannelServer(URI bindAddress) throws JMSException {
        try {
            bindAddress = URIConverter.convert(bindAddress);
            AsynchChannelServer server = new ChannelFactory().bindAsynchChannel(bindAddress);
            return server;
        } catch (IOException e) {
            throw JMSExceptionHelper.newJMSException(e.getMessage(), e);
        } catch (URISyntaxException e) {
            throw JMSExceptionHelper.newJMSException(e.getMessage(), e);
View Full Code Here

     * @throws JMSException
     */
    private AsynchChannel createAsynchChannel(URI remoteLocation) throws JMSException {
        try {
            remoteLocation = URIConverter.convert(remoteLocation);
            AsynchChannel channel = new ChannelFactory().openAsynchChannel(remoteLocation);
            // If the channel is not allready buffered.. lets buffer it.
            //if( channel.narrow(WriteBufferedAsynchChannel.class)==null && channel.narrow(WriteBufferedSynchChannel.class)==null ) {
            //    channel = new WriteBufferedAsynchChannel(channel);
            //}
            return channel;
View Full Code Here

     * @return
     */
    private AsynchChannelServer createAsynchChannelServer(URI bindAddress) throws JMSException {
        try {
            bindAddress = URIConverter.convert(bindAddress);
            AsynchChannelServer server = new ChannelFactory().bindAsynchChannel(bindAddress);
            return server;
        } catch (IOException e) {
            throw JMSExceptionHelper.newJMSException(e.getMessage(), e);
        } catch (URISyntaxException e) {
            throw JMSExceptionHelper.newJMSException(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.activeio.ChannelFactory

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.