Package com.swiftmq.swiftlet.net
Class Connection
java.lang.Object
com.swiftmq.swiftlet.net.Connection
An abstract connection.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this connection.long
Returns the connect time.abstract String
Returns the host name with which this connection is established to.Returns the connection inbound handler.abstract InputStream
Returns the connection input stream.Returns the connection meta dataabstract OutputStream
Returns the connection output stream.Returns the user objectboolean
isClosed()
Returns whether this connection is closed.boolean
Returns whether this connection is marked for close.void
setConnectionListener
(ConnectionListener connectionListener) Set the connection listener.void
setInboundHandler
(InboundHandler inboundHandler) Set the connection inbound handler.void
Mark this connection for close.void
setMetaData
(ConnectionMetaData metaData) Set the connection meta data Internal use only.void
setProtocolInputHandler
(ProtocolInputHandler protocolInputHandler) void
setProtocolOutputHandler
(ProtocolOutputHandler protocolOutputHandler) void
setUserObject
(Object userObject) Set a user object.
-
Field Details
-
dnsResolve
protected boolean dnsResolve
-
-
Constructor Details
-
Connection
protected Connection(boolean dnsResolve) Constructs the Connection
-
-
Method Details
-
setConnectionListener
Set the connection listener. Internal use only.- Parameters:
connectionListener
- connection listener.
-
getMetaData
Returns the connection meta data -
setMetaData
Set the connection meta data Internal use only.- Parameters:
metaData
- meta data.
-
getUserObject
Returns the user object- Returns:
- user object.
-
setUserObject
Set a user object. Can be used to assign user (Swiftlet) specific data to this connection.- Parameters:
userObject
- user object.
-
getProtocolInputHandler
-
setProtocolInputHandler
-
getProtocolOutputHandler
-
setProtocolOutputHandler
-
getInputActiveIndicator
-
getHostname
Returns the host name with which this connection is established to.- Returns:
- host name (null for multicast connections).
-
getInboundHandler
Returns the connection inbound handler.- Returns:
- inbound handler.
-
setInboundHandler
Set the connection inbound handler. Internal use only.- Parameters:
inboundHandler
- inbound handler.
-
getInputStream
Returns the connection input stream.- Returns:
- input stream.
-
getOutputStream
Returns the connection output stream.- Returns:
- output stream.
-
getConnectTime
public long getConnectTime()Returns the connect time.- Returns:
- connect time.
-
setMarkedForClose
public void setMarkedForClose()Mark this connection for close. Internal use only. -
isMarkedForClose
public boolean isMarkedForClose()Returns whether this connection is marked for close.- Returns:
- true/false.
-
isClosed
public boolean isClosed()Returns whether this connection is closed.- Returns:
- true/false.
-
close
public void close()Closes this connection. Internal use only.
-