Mercurial > hg4j
annotate src/org/tmatesoft/hg/core/SessionContext.java @ 698:822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 06 Aug 2013 21:18:33 +0200 |
parents | fba85bc1dfb8 |
children | a483b2b68a2e |
rev | line source |
---|---|
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
1 /* |
571
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
2 * Copyright (c) 2011-2013 TMate Software Ltd |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
3 * |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
6 * the Free Software Foundation; version 2 of the License. |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
7 * |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
11 * GNU General Public License for more details. |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
12 * |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
13 * For information on how to redistribute this software under |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
14 * the terms of a license other than GNU General Public License |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
15 * contact TMate Software at support@hg4j.com |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
16 */ |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
17 package org.tmatesoft.hg.core; |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
18 |
698
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
19 import java.net.URI; |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
20 |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
21 import org.tmatesoft.hg.internal.BasicSessionContext; |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
22 import org.tmatesoft.hg.internal.Experimental; |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
23 import org.tmatesoft.hg.internal.remote.RemoteConnectorDescriptor; |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
24 import org.tmatesoft.hg.repo.HgLookup.RemoteDescriptor; |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
25 import org.tmatesoft.hg.util.LogFacility; |
571
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
26 import org.tmatesoft.hg.util.Path; |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
27 |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
28 /** |
456
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
29 * Access to objects that might need to be shared between various distinct operations ran during the same working session |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
30 * (i.e. caches, log, etc.). It's unspecified whether session context is per repository or can span multiple repositories |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
31 * |
456
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
32 * <p>Note, API is likely to be extended in future versions, adding more object to share. |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
33 * |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
34 * @author Artem Tikhomirov |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
35 * @author TMate Software Ltd. |
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
36 */ |
456
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
37 public abstract class SessionContext { |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
38 // abstract class to facilitate adding more functionality without API break |
338
3cfa4d908fc9
Add options to control DataAccessProvider, allow to turn off use of file memory mapping in particular to solve potential sharing violation (os file handle gets released on MappedByteByffer being GC'd, not on FileChannel.close())
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
295
diff
changeset
|
39 |
3cfa4d908fc9
Add options to control DataAccessProvider, allow to turn off use of file memory mapping in particular to solve potential sharing violation (os file handle gets released on MappedByteByffer being GC'd, not on FileChannel.close())
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
295
diff
changeset
|
40 /** |
456
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
41 * Access wrapper for a system log facility. |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
42 * @return facility to direct dumps to, never <code>null</code> |
338
3cfa4d908fc9
Add options to control DataAccessProvider, allow to turn off use of file memory mapping in particular to solve potential sharing violation (os file handle gets released on MappedByteByffer being GC'd, not on FileChannel.close())
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
295
diff
changeset
|
43 */ |
456
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
44 public abstract LogFacility getLog(); |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
45 |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
46 /** |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
47 * Access configuration parameters of the session. |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
48 * @param name name of the session configuration parameter |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
49 * @param defaultValue value to return if parameter is not configured |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
50 * @return value of the session parameter, defaultValue if none found |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
51 */ |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
52 public abstract Object getConfigurationProperty(String name, Object defaultValue); |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
53 // perhaps, later may add Configuration object, with PropertyMarshal's helpers |
909306e412e2
Refactor LogFacility and SessionContext, better API for both
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
338
diff
changeset
|
54 // e.g. when there's standalone Caches and WritableSessionProperties objects |
490
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
55 |
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
56 /** |
571
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
57 * Provide a factory to create {@link Path} objects. |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
58 * |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
59 * Occasionally, there's a need to construct a {@link Path} object from a string/byte data |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
60 * kept in mercurial control files. Generally, default implementation (with {@link Path#create(CharSequence)} |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
61 * is enough, however, if there's a need to control number of string objects in memory (i.e. prevent duplicates), |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
62 * default implementation might need to be replaced with more sophisticated (e.g. using weak references or |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
63 * just a huge hash set). |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
64 * |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
65 * @return factory to construct Path objects, never <code>null</code> |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
66 */ |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
67 public Path.Source getPathFactory() { |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
68 return new Path.Source() { |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
69 public Path path(CharSequence p) { |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
70 return Path.create(p); |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
71 } |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
72 }; |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
73 } |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
74 |
e4ee4bf4c7d0
Let session context control creation of Path instances
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
490
diff
changeset
|
75 /** |
698
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
76 * Work in progress, provisional API. |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
77 * |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
78 * Provides descriptor that knows how to handle connections of specific kind |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
79 * |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
80 * FIXME Perhaps, implementation here shall return null for any URI, while the one |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
81 * in {@link BasicSessionContext} shall use our internal classes? However, |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
82 * present implementation provides support for uris handled in the library itself, and likely |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
83 * most clients need this, even if they supply own SessionContext |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
84 * |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
85 * @return <code>null</code> if supplied URI doesn't point to a remote repository or repositories of that kind are not supported |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
86 */ |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
87 @Experimental(reason="Work in progress, provisional API") |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
88 public RemoteDescriptor getRemoteDescriptor(URI uri) { |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
89 return new RemoteConnectorDescriptor.Provider().get(this, uri); |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
90 } |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
91 |
822f3a83ff57
in, out and clone tests pass for ssh repositories. Infrastructure to decouple HgRemoteRepository from specific Connector implementation
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
667
diff
changeset
|
92 /** |
490
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
93 * Providers of the context may implement |
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
94 */ |
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
95 public interface Source { |
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
96 SessionContext getSessionContext(); |
b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
456
diff
changeset
|
97 } |
667
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
98 |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
99 public static final class SourcePrim implements Source { |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
100 private final SessionContext ctx; |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
101 |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
102 public SourcePrim(SessionContext sessionContext) { |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
103 assert sessionContext != null; |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
104 ctx = sessionContext; |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
105 } |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
106 public SessionContext getSessionContext() { |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
107 return ctx; |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
108 } |
fba85bc1dfb8
Refactoring: move all encoding/decoding operations into single place, EncodingHelper
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
571
diff
changeset
|
109 } |
295
981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff
changeset
|
110 } |