org.sblim.slp.internal

Class MessageDispatcher

Implemented Interfaces:
Runnable

public class MessageDispatcher
extends java.lang.Object
implements Runnable

MessageDispatcher.java (C) Copyright IBM Corp. 2005, 2006 THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. You can obtain a current copy of the Common Public License from http://www.opensource.org/licenses/cpl1.0.php

Field Summary

protected InetAddress
iAddress
protected ServiceLocationException
iExErr
protected int
iMaxResults
protected ServiceLocationMessage
iMsgOut
protected Vector
iResponseList
protected int[]
iTimeoutList

Method Summary

protected static boolean
addPreviousResponder(ServiceLocationMessage pRequest, InetAddress pInetAddress)
static ServiceLocationException
dispatchDAMsg(Vector pDAList, ServiceLocationMessage pRequest, Vector pResults, int pMaxReplies)
static ServiceLocationException
dispatchDatagramMsg(ServiceLocationMessage pRequest, Vector pResponseList, int[] pTimeoutList, int pMaxResults, InetAddress pInetAddress, boolean pJustFirstResult)
static Vector
dispatchMulticastMsg(InetAddress pInetAddress, DatagramSocket pDatagramSocket, ServiceLocationMessage pRequest, int[] pMsTimeOutsList, int pMaxResults, boolean pGetFirstResult)
static ServiceLocationMessage
dispatchStreamMsg(InetAddress pInetAddress, ServiceLocationMessage pRequest, boolean pRetry)
static Vector
dispatchUAMsg(Vector pDAList, ServiceLocationMessage pRequestMsg, InetAddress pInetAddress)
static byte[]
getByteArray(String pHex)
protected static byte[]
getBytes(ServiceLocationMessage pRequest, boolean pUsingMCast, boolean pUsingStreams)
static void
main(String[] args)
protected static ServiceLocationMessage
parseMsg(DataInputStream pInputStream)
void
run()

Field Details

iAddress

protected InetAddress iAddress

iExErr

protected ServiceLocationException iExErr

iMaxResults

protected int iMaxResults

iMsgOut

protected ServiceLocationMessage iMsgOut

iResponseList

protected Vector iResponseList

iTimeoutList

protected int[] iTimeoutList

Method Details

addPreviousResponder

protected static boolean addPreviousResponder(ServiceLocationMessage pRequest,
                                              InetAddress pInetAddress)

dispatchDAMsg

public static ServiceLocationException dispatchDAMsg(Vector pDAList,
                                                     ServiceLocationMessage pRequest,
                                                     Vector pResults,
                                                     int pMaxReplies)

dispatchDatagramMsg

public static ServiceLocationException dispatchDatagramMsg(ServiceLocationMessage pRequest,
                                                           Vector pResponseList,
                                                           int[] pTimeoutList,
                                                           int pMaxResults,
                                                           InetAddress pInetAddress,
                                                           boolean pJustFirstResult)

dispatchMulticastMsg

public static Vector dispatchMulticastMsg(InetAddress pInetAddress,
                                          DatagramSocket pDatagramSocket,
                                          ServiceLocationMessage pRequest,
                                          int[] pMsTimeOutsList,
                                          int pMaxResults,
                                          boolean pGetFirstResult)
            throws ServiceLocationException

dispatchStreamMsg

public static ServiceLocationMessage dispatchStreamMsg(InetAddress pInetAddress,
                                                       ServiceLocationMessage pRequest,
                                                       boolean pRetry)
            throws ServiceLocationException

dispatchUAMsg

public static Vector dispatchUAMsg(Vector pDAList,
                                   ServiceLocationMessage pRequestMsg,
                                   InetAddress pInetAddress)
            throws ServiceLocationException

getByteArray

public static byte[] getByteArray(String pHex)

getBytes

protected static byte[] getBytes(ServiceLocationMessage pRequest,
                                 boolean pUsingMCast,
                                 boolean pUsingStreams)
            throws ServiceLocationException

main

public static void main(String[] args)

parseMsg

protected static ServiceLocationMessage parseMsg(DataInputStream pInputStream)
            throws ServiceLocationException

run

public void run()

Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.