|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.iperg.part.core.IpConnection org.iperg.part.core.IpHttpConnection
public class IpHttpConnection
The IpHttpConnection
class implements a PART HTTP
protocol connection.
Field Summary |
---|
Fields inherited from class org.iperg.part.core.IpConnection |
---|
BROKEN, CLOSED_LOCALLY, CLOSED_REMOTELY, CONNECTED, CONNECTING, LISTEN, UNCONNECTED |
Constructor Summary | |
---|---|
IpHttpConnection()
Create an unconnected HTTP connection object |
|
IpHttpConnection(IpUrl url)
Create an connected HTTP connection object representing the server side. |
Method Summary | |
---|---|
protected boolean |
_outgoingEventsAreCached()
Check if events sent via the send method are cached locally. |
protected void |
_send(IpNetworkEvent event)
Send an event to the remote process. |
protected void |
close()
Close the connection |
void |
insertEvent(IpNetworkEvent event)
Insert an event, "pretending" that is was received by the connection. |
protected IpConnection |
protoAccept()
Accept a incoming connection on the server socket opened by protoListen. |
protected void |
protoConnect(IpUrl url)
Connect to a network address represented by an url. |
protected IpUrl |
protoListen(IpUrl url)
Method to be implemented by sub-classes. |
void |
writeCachedEvents(java.io.OutputStream out)
Can be used on a server side connection to write all cached events to an output stream. |
Methods inherited from class org.iperg.part.core.IpConnection |
---|
getConnectionUrl, getRemoteProcessId, getSilence, getStatus, getTotalBytesReceived, getTotalBytesSent, getUrl, notifyBrokenConnection, notifyBytesReceived, notifyBytesSent, notifyReceivedEvent, run, setInputStream, setOutputStream, setUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IpHttpConnection()
public IpHttpConnection(IpUrl url)
Method Detail |
---|
protected void protoConnect(IpUrl url) throws IpInvalidUrlException, java.io.IOException
protoConnect
in class IpConnection
url
- A url representing a remote address
IpInvalidUrlException
- if the url protocol matches
the connection factory protocol but url is somehow invalid,
e.g., doesn't identify a remote address
java.io.IOException
- if a factory specific error occuredprotected IpUrl protoListen(IpUrl url) throws IpInvalidUrlException, java.io.IOException
IpConnection
protoListen
in class IpConnection
url
- A url identifying a local address
IpInvalidUrlException
- if the url parameter is
invalid, e.g., doesn't identify a local address
java.io.IOException
- if a protocol specific error occuredpublic void writeCachedEvents(java.io.OutputStream out)
out
- The output streamprotected IpConnection protoAccept() throws java.io.IOException
protoAccept
in class IpConnection
java.io.IOException
protected void close() throws java.io.IOException
close
in class IpConnection
java.io.IOException
- if the close failed for some reasonpublic void insertEvent(IpNetworkEvent event)
event
- The event that is to be insertedprotected void _send(IpNetworkEvent event) throws java.io.IOException
_send
in class IpConnection
event
- The event to send
java.io.IOException
- if a protocol specific error occuredprotected boolean _outgoingEventsAreCached()
_outgoingEventsAreCached
in class IpConnection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |