|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.solers.slp.ServiceLocationEnumerationImpl
Implements the ServiceLocationEnumeration interface defined in RFC 2614.
Field Summary | |
private SLPConfiguration |
_conf
|
private Vector |
_delivered
|
private short |
_errorCode
Holds the errorCode from the last response |
private int |
_maxWait
Max time to wait for response to UA message |
private UAMessage |
_message
|
private NetworkManager |
_net
|
private Vector |
_received
|
private boolean |
_requested
Used to remember if we've asked for responses yet. |
private int[] |
_retry
Array of timeout values read from configuration |
private DatagramSocket |
_uaSock
Datagram socket for UA messages |
private org.apache.log4j.Category |
cat
Default Logging category |
private ByteArrayOutputStream |
uaBos
Used for writing UA messages |
private DataOutputStream |
uaDos
Wrapper for ByteArrayOutputStream |
Constructor Summary | |
(package private) |
ServiceLocationEnumerationImpl(NetworkManager net,
UAMessage message)
|
Method Summary | |
void |
destroy()
Frees resources allocated by this enumeration. |
boolean |
hasMoreElements()
Returns whether more responses exist. |
Object |
next()
Returns the next SLP response received. |
Object |
nextElement()
|
private short |
parseResponse(byte[] buf)
Parses a datagram packet's buffer, adding responses to the list of received values. |
(package private) short |
readResponse()
Listens for a response to a UA message. |
private void |
removeDups()
Removes duplicate entries from the list of responses. |
private void |
transmitDatagram()
Performs the actual transmission of a UA message. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private org.apache.log4j.Category cat
private SLPConfiguration _conf
private NetworkManager _net
private UAMessage _message
private ByteArrayOutputStream uaBos
private DataOutputStream uaDos
private DatagramSocket _uaSock
private int[] _retry
private int _maxWait
private Vector _received
private Vector _delivered
private boolean _requested
private short _errorCode
Constructor Detail |
ServiceLocationEnumerationImpl(NetworkManager net, UAMessage message) throws ServiceLocationException
Method Detail |
public Object next() throws ServiceLocationException
next
in interface ServiceLocationEnumeration
ServiceLocationException
- if an error is received.java.util.NoSuchElementException
- if no more responses.public boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
next()
private void transmitDatagram() throws IOException
short readResponse() throws IOException
private void removeDups()
private short parseResponse(byte[] buf) throws IOException
public void destroy()
destroy
in interface ServiceLocationEnumeration
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |