BasePackConnection, BaseFetchConnection
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Writer | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public abstract void | close()
Redeclares org. Closes this resource, relinquishing any underlying resources. |
| public String | getMessages()
Implements org. Get the additional messages, if any, returned by the remote process. |
| protected Writer | Returns: writer to store messages from the remote.Get the writer that buffers messages from the remote side. |
| public String | getPeerUserAgent()
Implements org. User agent advertised by the remote server. |
| public final Ref | getRef(String
name of the ref to obtain. name)Implements org. Get a single advertised ref by name. |
| public final Collection | getRefs()
Implements org. Get the complete list of refs advertised as available for fetching or pushing. |
| public Map | getRefsMap()
Implements org. Get the complete map of refs advertised as available for fetching or pushing. |
| protected void | |
| protected void | setMessageWriter(Writer
the writer that messages will be delivered to. The writer's
writer)toString() method should be overridden to return the
complete contents.Set the writer that buffers messages from the remote side. |
| protected void |
| advertisedRefs | back to summary |
|---|---|
| private Map<String, Ref> advertisedRefs | |
| messageWriter | back to summary |
|---|---|
| private Writer messageWriter | |
| peerUserAgent | back to summary |
|---|---|
| private String peerUserAgent | |
| startedOperation | back to summary |
|---|---|
| private boolean startedOperation | |
| BaseConnection | back to summary |
|---|---|
| public BaseConnection() | |
| available | back to summary |
|---|---|
| protected void available(Map<String, Ref> all) Denote the list of refs available on the remote repository. Implementors should invoke this method once they have obtained the refs that are available from the remote repository. | |
| close | back to summary |
|---|---|
| public abstract void close() Redeclares org. Doc from org. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
Close any resources used by this connection. If the remote repository is contacted by a network socket this method must close that network socket, disconnecting the two peers. If the remote repository is actually local (same system) this method must close any open file handles used to read the "remote" repository.
If additional messages were produced by the remote peer, these should
still be retained in the connection instance for
| |
| getMessages | back to summary |
|---|---|
| public String getMessages() Implements org. Doc from org. Get the additional messages, if any, returned by the remote process. These messages are most likely informational or error messages, sent by the remote peer, to help the end-user correct any problems that may have prevented the operation from completing successfully. Application UIs should try to show these in an appropriate context.
The message buffer is available after | |
| getMessageWriter | back to summary |
|---|---|
| protected Writer getMessageWriter() Get the writer that buffers messages from the remote side.
| |
| getPeerUserAgent | back to summary |
|---|---|
| public String getPeerUserAgent() Implements org. Doc from org. User agent advertised by the remote server. User agent advertised by the remote server. | |
| getRef | back to summary |
|---|---|
| public final Ref getRef(String name) Implements org. Doc from org. Get a single advertised ref by name.
The name supplied should be valid ref name. To get a peeled value for a
ref (aka | |
| getRefs | back to summary |
|---|---|
| public final Collection Implements org. Doc from org. Get the complete list of refs advertised as available for fetching or pushing. The returned refs may appear in any order. If the caller needs these to be sorted, they should be copied into a new array or List and then sorted by the caller as necessary.
| |
| getRefsMap | back to summary |
|---|---|
| public Map Implements org. Doc from org. Get the complete map of refs advertised as available for fetching or pushing. | |
| markStartedOperation | back to summary |
|---|---|
| protected void markStartedOperation() throws TransportException Helper method for ensuring one-operation per connection. Check whether operation was already marked as started, and mark it as started.
| |
| setMessageWriter | back to summary |
|---|---|
| protected void setMessageWriter(Writer writer) Set the writer that buffers messages from the remote side.
| |
| setPeerUserAgent | back to summary |
|---|---|
| protected void setPeerUserAgent(String agent) Remember the remote peer's agent.
| |