Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
COOS - Connected Objects Operating System (www.connectedobjects.org). Copyright (C) 2009 Telenor ASA and Tellu AS. All rights reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. You may also contact one of the following for additional information: Telenor ASA, Snaroyveien 30, N-1331 Fornebu, Norway (www.telenor.no) Tellu AS, Hagalokkveien 13, N-1383 Asker, Norway (www.tellu.no)
 
 package org.coos.messaging.impl;
 
 

Author(s):
Knut Eilif Husa, Tellu AS
 
 public abstract class DefaultChannel extends DefaultProcessor implements Channel {
 
 
     // The inLink, direction into the channel/bus
     protected Link inLink;
 
     // The outLink, direction from the channel/bus
     protected Link outLink;
 
     // The Uuid of the connecting party
     protected String connectingPartyUuid;
 
     // The Linkmanager that connects the links
     protected Connectable connectable;
 
     // Indicates if the Channel shall take action to initialize
     protected boolean init;
 
     // The transport mechanism connected to the Channel
     protected Transport transport;
 
     protected boolean connected = false;
 
     protected Vector protocols = new Vector();
 
     protected String segment = "";
 
     private boolean defaultGw = false;
 
     private boolean receiveRoutingInfo = true;
 
     public DefaultChannel() {
          = new Link(this);
          = new Link(this);
     }
 
     public Link getInLink() {
         return ;
     }
 
     public void setInLink(Link inLink) {
         this. = inLink;
         this..setChannel(this);
         this..setInLink(true);
     }
 
     public Link getOutLink() {
         return ;
     }
 
     public void setOutLink(Link outLink) {
         this. = outLink;
         this..setChannel(this);
         this..setOutLink(true);
     }
 
     public String getName() {
         return ;
    }
    public void disconnect() {
    }
    public Connectable getLinkManager() {
        return ;
    }
    public void setLinkManager(Connectable linkManager) {
        this. = linkManager;
    }
    public Vector getProtocols() {
        return ;
    }
    public void addProtocol(String protocol) {
        .addElement(protocol);
    }
    public void setProtocols(Vector protocols) {
        this. = protocols;
    }
    public Transport getTransport() {
        return ;
    }
    public void setTransport(Transport transport) {
        this. = transport;
        if (this. != null) {
            this..setChannel(this);
        }
    }
    public void processMessage(Message msgthrows ProcessorException {
        .processMessage(msg);
    }
    public boolean isInit() {
        return ;
    }
    public void setInit(boolean init) {
        this. = init;
    }
    public Processor copy() {
        Channel channel;
        channel = (Channelsuper.copy();
        channel.setInLink((Link.copy());
        channel.setOutLink((Link.copy());
        channel.setInit();
        if ( != null) {
            channel.setTransport((Transport.copy());
        }
        channel.setProtocols();
        channel.setSegment();
        channel.setDefaultGw();
        return channel;
    }
    public String getSegment() {
        return ;
    }
    public void setSegment(String segment) {
        this. = segment;
    }
    public boolean isDefaultGw() {
        return ;
    }
    public void setDefaultGw(boolean defaultGw) {
        this. = defaultGw;
    }
    public boolean isReceiveRoutingInfo() {
        return ;
    }
    public void setReceiveRoutingInfo(boolean receiveRoutingInfo) {
        this. = receiveRoutingInfo;
    }
    public boolean isConnected() {
        return ;
    }
    
    public void setConnected(boolean connected) {
        this. = connected;
    }
New to GrepCode? Check out our FAQ X