Package gov.nist.core

Examples of gov.nist.core.Host


        SIPTransaction returnChannel;

        // Create a new client transaction around the
        // superclass' message channel
        // Create the host/port of the target hop
        Host targetHost = new Host();
        targetHost.setHostname(nextHop.getHost());
        HostPort targetHostPort = new HostPort();
        targetHostPort.setHost(targetHost);
        targetHostPort.setPort(nextHop.getPort());
        MessageChannel mc = mp.createMessageChannel(targetHostPort);
View Full Code Here


     *
     * @throws UnknownHostException If the host in the Hop doesn't exist.
     */
    public MessageChannel createRawMessageChannel(String sourceIpAddress, int sourcePort,
            Hop nextHop) throws UnknownHostException {
        Host targetHost;
        HostPort targetHostPort;
        Iterator processorIterator;
        MessageProcessor nextProcessor;
        MessageChannel newChannel;

        // Create the host/port of the target hop
        targetHost = new Host();
        targetHost.setHostname(nextHop.getHost());
        targetHostPort = new HostPort();
        targetHostPort.setHost(targetHost);
        targetHostPort.setPort(nextHop.getPort());

        // Search each processor for the correct transport
View Full Code Here

          if(uri.isSipURI()) {
            SipURI sipUri = (SipURI) uri;
            String host = sipUri.getHost();
            NioTcpMessageProcessor processor = (NioTcpMessageProcessor) this.messageProcessor;
            HostPort hostPort = new HostPort();
            hostPort.setHost(new Host(host));
            hostPort.setPort(5060);
            processor.assignChannelToDestination(hostPort, this);
          }
        }
        ContactHeader contact = (ContactHeader)message.getHeader(ContactHeader.NAME);
View Full Code Here

     */
    public void setHost(String host) throws ParseException {
        if (sentBy == null)
            sentBy = new HostPort();
        try {
            Host h = new Host(host);
            sentBy.setHost(h);
        } catch (Exception e) {
            throw new NullPointerException(" host parameter is null");
        }
    }
View Full Code Here

    */
    public String getHost() {
        if (sentBy == null)
            return null;
        else {
            Host host = sentBy.getHost();
            if (host == null)
                return null;
            else
                return host.getHostname();
        }
    }
View Full Code Here

        if (mAddr == null)
            throw new NullPointerException(
                "JAIN-SIP Exception, "
                    + "Via, setMAddr(), the mAddr parameter is null.");

        Host host = new Host();
        host.setAddress(mAddr);
        NameValue nameValue = new NameValue(ParameterNames.MADDR, host);
        setParameter(nameValue);

    }
View Full Code Here


    public void sendHeartbeat(String ipAddress, int port) throws IOException {

        HostPort targetHostPort  = new HostPort();
        targetHostPort.setHost(new Host( ipAddress));
        targetHostPort.setPort(port);
        MessageChannel messageChannel = this.messageProcessor.createMessageChannel(targetHostPort);
        SIPRequest siprequest = new SIPRequest();
        siprequest.setNullRequest();
        messageChannel.sendMessage(siprequest);
View Full Code Here

    /** Returns the type of the network for this Connection.
     * @throws SdpParseException
     * @return the string network type.
     */
    public String getAddress() throws SdpParseException {
        Host addr = getHost();
        if (addr == null)
            return null;
        else
            return addr.getAddress();
    }
View Full Code Here

     */
    public void setAddress(String addr) throws SdpException {
        if (addr == null)
            throw new SdpException("The addr parameter is null");
        else {
            Host host = getHost();
            if (host == null)
                host = new Host();
            host.setAddress(addr);
            setAddress(host);
        }
    }
View Full Code Here

    SIPTransaction returnChannel;

    // Create a new client transaction around the
    // superclass' message channel
    // Create the host/port of the target hop
    Host targetHost = new Host();
    targetHost.setHostname(nextHop.getHost());
    HostPort targetHostPort = new HostPort();
    targetHostPort.setHost(targetHost);
    targetHostPort.setPort(nextHop.getPort());
    MessageChannel mc = mp.createMessageChannel(targetHostPort);
View Full Code Here

TOP

Related Classes of gov.nist.core.Host

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.