本文整理汇总了Java中com.gemstone.gemfire.cache.Cache.getSecurityLoggerI18n方法的典型用法代码示例。如果您正苦于以下问题:Java Cache.getSecurityLoggerI18n方法的具体用法?Java Cache.getSecurityLoggerI18n怎么用?Java Cache.getSecurityLoggerI18n使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.gemstone.gemfire.cache.Cache
的用法示例。
在下文中一共展示了Cache.getSecurityLoggerI18n方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AuthorizeRequestPP
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
public AuthorizeRequestPP(String postAuthzFactoryName,
ClientProxyMembershipID id, Principal principal, Cache cache)
throws ClassNotFoundException, NoSuchMethodException,
IllegalAccessException, InvocationTargetException {
this.id = id;
this.principal = principal;
if (this.principal instanceof Serializable) {
this.isPrincipalSerializable = true;
} else {
this.isPrincipalSerializable = false;
}
this.logger = cache.getSecurityLoggerI18n();
Method postAuthzMethod = ClassLoadUtil.methodFromName(postAuthzFactoryName);
this.postAuthzCallback = (AccessControl)postAuthzMethod.invoke(null,
(Object[])null);
this.postAuthzCallback.init(principal, id.getDistributedMember(), cache);
if (this.logger.infoEnabled()) {
this.logger.info(
LocalizedStrings.AuthorizeRequestPP_AUTHORIZEREQUESTPP_SETTING_POST_PROCESS_AUTHORIZATION_CALLBACK_TO_1_FOR_CLIENT_0,
new Object[] {id, postAuthzFactoryName});
}
}
示例2: AuthorizeRequest
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
public AuthorizeRequest(String authzFactoryName, ClientProxyMembershipID id,
Principal principal, Cache cache) throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException,
NotAuthorizedException {
this.principal = principal;
if (this.principal instanceof Serializable) {
this.isPrincipalSerializable = true;
}
else {
this.isPrincipalSerializable = false;
}
this.id = id;
this.logger = cache.getSecurityLoggerI18n();
Method authzMethod = ClassLoadUtil.methodFromName(authzFactoryName);
this.authzCallback = (AccessControl)authzMethod
.invoke(null, (Object[])null);
this.authzCallback.init(principal, id.getDistributedMember(), cache);
if (this.logger.infoEnabled()) {
this.logger.info(
LocalizedStrings.AuthorizeRequest_AUTHORIZEREQUEST_CLIENT_0_IS_SETTING_AUTHORIZATION_CALLBACK_TO_1,
new Object[] {id, authzFactoryName});
}
}
示例3: init
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
public void init(Principal principal, DistributedMember remoteMember,
Cache cache) throws NotAuthorizedException {
this.logger = cache.getSecurityLoggerI18n();
}
示例4: init
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
public void init(Principal principal, DistributedMember remoteMember,
Cache cache) throws NotAuthorizedException {
this.principalName = (principal == null ? "" : principal.getName());
this.logger = cache.getSecurityLoggerI18n();
}
示例5: ServerConnection
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
/**
* Creates a new <code>ServerConnection</code> that processes messages
* received from an edge client over a given <code>Socket</code>.
*/
public ServerConnection(
Socket s,
Cache c,
CachedRegionHelper helper,
CacheServerStats stats,
int hsTimeout,
int socketBufferSize,
String communicationModeStr,
byte communicationMode,
Acceptor acceptor)
{
StringBuffer buffer = new StringBuffer(100);
if(((AcceptorImpl)acceptor).isGatewayReceiver()) {
buffer
.append("GatewayReceiver connection from [");
}
else{
buffer
.append("Server connection from [");
}
buffer
.append(communicationModeStr)
.append(" host address=")
.append(s.getInetAddress().getHostAddress())
.append("; ")
.append(communicationModeStr)
.append(" port=")
.append(s.getPort())
.append("]");
this.name = buffer.toString();
this.stats = stats;
this.acceptor = (AcceptorImpl)acceptor;
this.crHelper = helper;
this.logger = c.getLoggerI18n();
this.securityLogger = c.getSecurityLoggerI18n();
this.communicationModeStr = communicationModeStr;
this.communicationMode = communicationMode;
this.principal = null;
this.authzRequest = null;
this.postAuthzRequest = null;
this.randomConnectionIdGen = new Random(this.hashCode());
try {
// requestMsg.setUseDataStream(useDataStream);
// replyMsg.setUseDataStream(useDataStream);
// responseMsg.setUseDataStream(useDataStream);
// errorMsg.setUseDataStream(useDataStream);
initStreams(s, socketBufferSize, stats);
Assert.assertTrue(this.logger != null);
requestMsg.setLogger(this.logger);
replyMsg.setLogger(this.logger);
responseMsg.setLogger(this.logger);
chunkedResponseMsg.setLogger(this.logger);
queryResponseMsg.setLogger(this.logger);
executeFunctionResponseMsg.setLogger(this.logger);
registerInterestResponseMsg.setLogger(this.logger);
errorMsg.setLogger(this.logger);
if (logger.fineEnabled()) {
logger.fine(getName() + ": Accepted client connection from " +
"[client host name=" + s.getInetAddress().getCanonicalHostName() +
"; client host address=" + s.getInetAddress().getHostAddress() +
"; client port=" + s.getPort() + "]");
}
this.handShakeTimeout = hsTimeout;
}
catch (Exception e) {
if (logger.fineEnabled())
logger.fine("While creating server connection", e);
}
}
示例6: CacheClientNotifier
import com.gemstone.gemfire.cache.Cache; //导入方法依赖的package包/类
/**
* Constructor.
*
* @param cache
* The GemFire <code>Cache</code>
* @param acceptorStats
* @param maximumMessageCount
* @param messageTimeToLive
* @param transactionTimeToLive - ttl for txstates for disconnected clients
* @param listener a listener which should receive notifications
* abouts queues being added or removed.
* @param overflowAttributesList
*/
private CacheClientNotifier(Cache cache, CacheServerStats acceptorStats,
int maximumMessageCount, int messageTimeToLive, int transactionTimeToLive,
ConnectionListener listener,
List overflowAttributesList, boolean isGatewayReceiver) {
// Set the Cache
this.setCache((GemFireCacheImpl)cache);
this.acceptorStats = acceptorStats;
// Set the LogWriterI18n
this._logger = cache.getLoggerI18n();
this._connectionListener = listener;
// Set the security LogWriter
this._securityLogger = cache.getSecurityLoggerI18n();
// Create the overflow artifacts
if (overflowAttributesList != null
&& !HARegionQueue.HA_EVICTION_POLICY_NONE.equals(overflowAttributesList
.get(0))) {
haContainer = new HAContainerRegion(cache.getRegion(Region.SEPARATOR
+ BridgeServerImpl.clientMessagesRegion((GemFireCacheImpl)cache,
(String)overflowAttributesList.get(0),
((Integer)overflowAttributesList.get(1)).intValue(),
((Integer)overflowAttributesList.get(2)).intValue(),
(String)overflowAttributesList.get(3),
(Boolean)overflowAttributesList.get(4))));
}
else {
haContainer = new HAContainerMap(new HashMap());
}
if (this._logger.fineEnabled()) {
this._logger.fine("ha container ("
+ haContainer.getName()
+ ") has been created.");
}
this.maximumMessageCount = maximumMessageCount;
this.messageTimeToLive = messageTimeToLive;
this.transactionTimeToLive = transactionTimeToLive;
// Initialize the statistics
StatisticsFactory factory ;
if(isGatewayReceiver){
factory = new DummyStatisticsFactory();
}else{
factory = this.getCache().getDistributedSystem();
}
this._statistics = new CacheClientNotifierStats(factory);
// Initialize the executors
// initializeExecutors(this._logger);
try {
this.logFrequency = Long.valueOf(System
.getProperty(MAX_QUEUE_LOG_FREQUENCY));
if (this.logFrequency <= 0) {
this.logFrequency = DEFAULT_LOG_FREQUENCY;
}
} catch (Exception e) {
this.logFrequency = DEFAULT_LOG_FREQUENCY;
}
// Schedule task to periodically ping clients.
scheduleClientPingTask();
}